Into Windows

  • Home
  • Windows 11
  • Windows 10
  • Windows 7
  • Privacy
You are here: Home » Windows 10 » How To Run MSI File As Administrator From Command Prompt In Windows

How To Run MSI File As Administrator From Command Prompt In Windows

Last Updated on June 18, 2016 by admin 24 Comments

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.

Run MSI file as administrator from Command Prompt

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”

Run MSI file as administrator in Command Prompt

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.

Run MSI files as administrator

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.

Run MSI file as administrator

Step 3: Click Yes button again when you see the following dialog:

Add Run as administrator to MSI files

Step 4: Finally, click OK button when you see this dialog.

Add Run as administrator to MSI files in Windows

That’s it! From now onwards, whenever you right-click on MSI file, Run as administrator option appears in the context menu.

Good luck!

Filed Under: Windows 10, Windows 8.1 Tagged: Command Prompt

Related Posts

  • Launch Elevated Command Prompt From Command Prompt
  • Burn ISO/IMG File From Command Prompt In Windows 10
  • How To Automatically Run Command Prompt As Administrator
  • How To Delete A File From Command Prompt
  • How To Make Command Prompt Transparent In Windows 10
  • Pin Admin Command Prompt To Taskbar In Windows 10

Comments

  1. Yasin Yanar says

    October 7, 2022 at 3:26 pm

    Thanks a lot. But reg file links isn’t work :)

  2. Tim says

    May 19, 2022 at 10:00 am

    bro I was trying to figure that out for so long thank you!!!!!!!!

  3. ramesh says

    April 22, 2020 at 12:19 pm

    thank you very much

  4. poor btch says

    March 29, 2020 at 3:26 pm

    dude you are a lengend! thanks

  5. Kibaj says

    February 15, 2020 at 12:12 am

    worked thanks

  6. R.Blinzler says

    January 27, 2020 at 9:29 am

    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’.

  7. R. Blinzler says

    January 27, 2020 at 9:09 am

    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…’

  8. jack says

    June 6, 2019 at 3:12 pm

    thanks! the command part has worked!

  9. Morrell says

    February 4, 2019 at 11:49 pm

    It’s the little things that keep you from throwing the PC against the wall.

    Great article, great share.

  10. Michael Henning says

    December 21, 2018 at 5:36 am

    Great information is timeless, many thanks.

    Mike

  11. Itoro says

    July 2, 2018 at 8:05 pm

    The first option did not work when using it to install mysql on win10

  12. Dean says

    May 24, 2018 at 8:46 pm

    Thank you kindly

  13. vlad says

    May 2, 2018 at 7:03 pm

    Super easy, thanks!

  14. Vic Daniel says

    April 29, 2018 at 11:48 am

    Thank you, My Prince. That feature has been sorely lacking in all versions of Windows.

  15. Håkan Fors says

    January 3, 2018 at 2:27 am

    Great solution! Thx a lot!

  16. Tomek says

    November 29, 2017 at 9:53 pm

    Thank you, you save my life again.

  17. Ferhat says

    April 28, 2017 at 1:14 am

    Thank you! It is done now.

  18. Vazha Gelashvili says

    March 16, 2017 at 5:30 pm

    Windows 10 compatible <3.

  19. Vazha Gelashvili says

    March 16, 2017 at 5:28 pm

    Thank you,the second method works on domain client as well.

  20. Velmurugan Subramanian says

    March 2, 2017 at 10:43 pm

    thank yioou~~!!

  21. Matt says

    November 16, 2016 at 12:33 am

    Thank you sir.

  22. one hour later says

    September 20, 2016 at 12:24 am

    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

  23. Me says

    June 12, 2016 at 9:28 pm

    THANKS!

  24. Leo Goldseed says

    December 8, 2015 at 12:08 pm

    Extremely helpful. THANK YOU!!

Leave a Reply

Your email address will not be published. Required fields are marked *

Advertisements

Search Into Windows

Recent posts

  • 5 Ways To Go To Desktop In Windows 11
  • How To Show Battery Percentage On Taskbar In Windows 11
  • Fix: AMD Software Adrenalin Edition Not Opening In Windows 11
  • How To Show Year On Windows 11 Taskbar
  • Windows 11 24H2 Is Available Now
  • How To Create 7z & TAR Files In Windows 11 Without Using Additional Apps
  • How To Remove Bell Icon From Taskbar In Windows 11
  • How To Reinstall Windows 11 Without Losing Apps And Files
  • How To Hide/Show Files & Icons On Desktop In Windows 10/11
  • How To Show Hidden Icons On Taskbar In Windows 11

About us

  • About Us
  • Contact Us
  • Privacy Policy

Copyright © 2025 · Into Windows