Skip to content

Add “Install as…” context menu entry to windows explorer

August 12, 2011

If you’re using a restricted user account for your day to day work and only elevate to an administrator account when installing software, you probably have noticed that you cannot easily do this for MSI files.

If you’re installing from an executable (exe) file, there is an option in the context menu to run the file as a different user (Run as). This option is missing for MSI files.

One reason for this that I found on symantec’s forums is that:

Windows Installer by default doesn’t elevate to higher privileges until it is about to actually start doing work in the install sequence.

One way to elevate yourself to install MSI files is through command prompt (cmd). You’ll have to use the following command:

runas /u: "msiexec.exe /i "

Unfortunately this requires a lot of typing and it your path includes spaces it becomes a huge mess.

A more convenient way to elevate yourself for MSI installation is to add a context menu item just like for EXE files. This is done by modifying the system registry. CAUTION: before modifying the registry, make sure to make backups.

To add the context menu entry, you need to add the following key (don’t copy paste, read on why):

@="%SystemRoot%\System32\msiexec.exe" /i "%1" %*

The @ refers to the (Default) entry.

If you try to do this manually, you will notice that the (Default) value has REG_SZ type, however for this to work the type needs to be REG_EXPAND_SZ. It is not possible to achieve this through regedit.

You will have to import the settings into the registry from a .reg file. Here’s what it should contain:

Windows Registry Editor Version 5.00


You can make the file yourself or download it from here

At this point you will have a “Run as…” menu item.

You can change the displayed text by editing the (Default) value of

I recommend using “Install &as…”. This will match the default “Install” action. The ampersand (&) makes the menu entry responsive to Alt commands (Alt+A) in this case.

You can also change the order in which the items are listed by editing the (Default) value of

I listed “Install as…” as the second item by inserting “runas” right after “Open”


From → Windows

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: