Installing MSI Packages with Elevated Privileges

by Mitch Tulloch [Published on 18 Jan. 2006 / Last Updated on 18 Jan. 2006]

Want to right-click on a .msi file and select Run As? Here's how!

RunAs is a great way of temporarily elevating your privileges to admin level when you are logged on as an ordinary user. However, while you can right-click on .exe files and select Run As from the shortcut menu, this doesn't work with Windows Installer (.msi) packages.

Here's a workaround that makes this possible. Open Registry Editor as administrator and create the following key under HKCR\Msi.Package\shell:


Now set the default value of this key to the following:

   Install &as...

Now create the following subkey:


Set the default value of this subkey to the following:

   msiexec /i "%1"

Now you should be able to right-click on a .msi file and select Install As from the shortcut menu.

Mitch Tulloch

The Author — Mitch Tulloch

Mitch Tulloch is a well-known expert on Windows Server administration and cloud computing technologies. He has published over a thousand articles on information technology topics and has written, contributed to or been series editor for over 50 books.

Latest Contributions

Featured Links