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

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

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:UsersDonDownloads7z920-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!

Leave a Reply

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