In Windows Vista, Windows 7, Windows 8 and the latest Windows 10, when you right-click on an executable (.exe) file, Run as administrator option appears in the context menu along with many other common options. The Run as admin option appears for both installed applications as well as executable of setup files.
As you likely have observed by now, Windows doesn’t show Run as administrator option when you right-click on a MSI file. That is, if you have the setup file of a program in the form of MSI and want to run the MSI file as admin, Windows doesn’t let you run MSI file with admin rights with default settings.
The setup file of many programs, including the very popular 7-Zip for Windows 64-bit, is available as MSI file. If for some reason, you want to run MSI files with admin rights, here is how to do it.
The first method is to use the Command Prompt to run MSI file as administrator. This is the best method if you rarely run MSI file with admin rights. And if you have to run MSI file with admin rights very often, you can easily add Run as administrator option to context menu of MSI files. That is, once added, Run as administrator option will appear when you right-click on a MSI file.
Following are the methods to run a MSI file as administrator
Run MSI as administrator from Command Prompt
Step 1: The first step is to 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, in Windows 7 and Windows 10, you can navigate to Start menu, All programs and Accessories. And then right-click on the Command Prompt and click Run as administrator.
Click Yes button when you see the UAC prompt.
NOTE: It’s important to open the Command Prompt as admin in order to launch MSI files as administrator.
Step 2: In the Command Prompt, execute the following command to run MSI file as admin:
msiexec /a “pathtotheMSIfile”
For instance, if your 7-Zip’s MSI file is located in Downloads folder, then you need to enter both path to the file as well as the name of the MSI file.
Ex: msiexec /a “C:\Users\Don\Downloads\7z920-x64.msi”
To easily get the path to the file, hold down the Shift key while right-clicking on the MSI file and then click Copy as path option to copy the path to the clipboard. You can then paste this path in the Command Prompt by right-clicking and then clicking Paste option. Note that Windows 10 supports Ctrl+V hotkey in Command Prompt.
Add Run as administrator option for MSI
Alternatively, you can configure Windows to display Run as administrator option when you right-click on MSI files. To do so, simply follow the given below instructions.
Step 1: Simply download this MSIFileRunAsAdmin.Zip file and then extract the ZIP file to get a Registry file named MSIFileRunAsAdmin.Reg file.
Step 2: Double-click on MSIFileRunAsAdmin.Reg file or simply right-click on it and then click Merge option. Click Yes button when you see the UAC prompt.
Step 3: Click Yes button again when you see the following dialog:
Step 4: Finally, click OK button when you see this dialog.
That’s it! From now onwards, whenever you right-click on MSI file, Run as administrator option appears in the context menu.
Good luck!
Yasin Yanar says
Thanks a lot. But reg file links isn’t work :)
Tim says
bro I was trying to figure that out for so long thank you!!!!!!!!
ramesh says
thank you very much
poor btch says
dude you are a lengend! thanks
Kibaj says
worked thanks
R.Blinzler says
Using a Windows 10 PC.
First I tried using the registry key modifier ‘MSIFileRunAsAdmin.Zip’ and still received a message at the end that there were insufficient privileges.
Second, I followed the instructions to install from the Command Prompt. I immediately received a message that my app was installed (without going through the normal installation process). Now when I try to access the app or the folder the app was installed to, I’m told ‘Access is denied’.
R. Blinzler says
This still did not work for me. As installation neared the end, I still got a message stating ‘The installer has insufficient privileges to access this director…’
jack says
thanks! the command part has worked!
Morrell says
It’s the little things that keep you from throwing the PC against the wall.
Great article, great share.
Michael Henning says
Great information is timeless, many thanks.
Mike
Itoro says
The first option did not work when using it to install mysql on win10
Dean says
Thank you kindly
vlad says
Super easy, thanks!
Vic Daniel says
Thank you, My Prince. That feature has been sorely lacking in all versions of Windows.
Håkan Fors says
Great solution! Thx a lot!
Tomek says
Thank you, you save my life again.
Ferhat says
Thank you! It is done now.
Vazha Gelashvili says
Windows 10 compatible <3.
Vazha Gelashvili says
Thank you,the second method works on domain client as well.
Velmurugan Subramanian says
thank yioou~~!!
Matt says
Thank you sir.
one hour later says
please update your blog, /a on msiexec installs as Administrative Installation , this is not administrator permissions, this is apples/oranges . you want to use msiexec /i
Me says
THANKS!
Leo Goldseed says
Extremely helpful. THANK YOU!!