Skip to main content
CallTower Solutions Center

How to Run .msi Files as Administrator

How to run .msi files as administrator

Starting in Windows Server 2012 the "Run as administrator" option no longer appears when right clicking a .msi file. This may be a required step when installing certain applications onto your Windows Server. Below are some options to be able to run a .msi file as an administrator.

First Option

As a single use solution, you can run the .msi as an administrator from the Windows command prompt.

  1. Open elevated Command Prompt. To do so, type "CMD" in Start menu or Start screen search box, and then simultaneously press Ctrl+Shift+Enter keys.
    • Alternatively you can also right click the Start icon in the bottom left corner and select "Command Prompt (Admin)"
    • Capture3.PNG
  2. Click Yes button when you see the UAC prompt.
    • Capture.PNG
  3. In the Command Prompt, execute the following command to run MSI file as admin:

    msiexec /a “pathtotheMSIfile” (ex: msiexec /a "C:\Users\court\Downloads\PWSyncClientInstaller64.msi")

    • Capture2.PNG

Second Option

As a more long term solution you can modify the registry to add the "Run as administrator" option back when right clicking on a .msi file. If you would like to bypass manually editing the registry and simply run a ready-to-use registry file, click here. Please note, that if you are not experienced in editing Windows registry I highly recommend using only option 1 above. 

  1. Open Registry Editor
  2. Go to the following Registry key: "HKEY_CLASSES_ROOT\Msi.Package\shell"
    • If you have no such Registry key, then just create it.

  3. Create here a new subkey named "runas". You will get "HKEY_CLASSES_ROOT\Msi.Package\shell\runas"

  4. Under the runas subkey, create a new subkey called "command"

  5. Set the default parameter of the command subkey to the following text: "C:\Windows\System32\msiexec.exe /i \"%1\" %*"

    • Your registry should now look like the image below:

    • 1.png

  6. You can now test and right click on any .msi file and you should see the option to "Run as administrator".

    • 2.png

  • Was this article helpful?