Adding the "Run As..." option to the context menu for .MSI and .MSP packages

Copy and paste the following text to a text file and save it as a .reg file. This will add "Run As..." as an option to the right-click menu for all .MSI (installation) and .MSP (patch) files for the current user.

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Msi.Package\shell\runas]
@=""

[HKEY_CURRENT_USER\Software\Classes\Msi.Package\shell\runas\command]
@="\"%1\" %*"

[HKEY_CURRENT_USER\Software\Classes\Msi.Patch\shell\runas]
@=""

[HKEY_CURRENT_USER\Software\Classes\Msi.Patch\shell\runas\command]
@="\"%1\" %*"

To add this function for all users, use the following script instead (NOTE: Installing this script requires Admin rights or write privileges to the HKEY_CLASSES_ROOT registry hive.):

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Msi.Package\shell\runas]
@=""

[HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\Msi.Patch\shell\runas]
@=""

[HKEY_CLASSES_ROOT\Msi.Patch\shell\runas\command]
@="\"%1\" %*"

This can be very helpful for installing packages as a different user (in a different security context) for example, when installing or running Windows applications as a non-Administrator which is highly recommended for security reasons.


Author: ASAK
Created: Jan 31 2007
Categories: Windows
TechByte #149

Warning: By visiting this site and/or by using any information contained herein, you agree to the Techbytes.ca terms of use.



Add a comment about this TechByte

If you wish to add a comment regarding this TechByte, please use the form below. Please note that by submitting comments using this form you are allowing all of the information submitted to be visible on this website. Any comments submitted using this form will only be shown on the website if they are approved by the administrators of this site. IF APPROVED, COMMENTS MAY TAKE SEVERAL DAYS TO BE POSTED.

Posted By: (Optional)

Comments:


Other TechBytes: