Accounts Add Run as administrator to Context Menu of MSI Files in Windows 11


  • Staff
MSI_banner.png

This tutorial will show you how to add or remove the Run as administrator context menu item for .msi files for all users in Windows 10 and Windows 11.

Windows runs desktops apps and application files (ex: .bat, .cmd, .exe, and .msc file types) in user mode by default without elevated administrator rights unless it prompts you with UAC to run elevated (highest privileges).

When you use Run as administrator on a desktop app or application file, you are allowing it to run with full administrator access to everything on the computer. This means you are giving it special permissions to access restricted parts of the computer that would otherwise be off-limits. This could be a potential security risk if not a trusted app or application file, but sometimes "Run as administrator" is necessary for a trusted app or application file to run properly if it requires elevated rights for full access.

A .msi file is a Windows Installer package file. Is uses the Microsoft Windows Installer service to configure installer packages, such as applications.


You must be signed in as an administrator to add, remove, and use the Run as administrator context menu for .msi files.



EXAMPLE: "Run as administrator" context menu for MSI files

MSI_Run_as_administrator.png
MSI_Run_as_administrator-2.png



Here's How:

1 Do step 2 (add) or step 3 (remove) below for what you would like to do.

2 Add Run as administrator to Context Menu of MSI Files

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Add_Run_as_administrator_to_MSI_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.msi]
@="Msi.Package"

[HKEY_CLASSES_ROOT\Msi.Package\Shell\runas]
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command]
@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,\
  73,00,69,00,65,00,78,00,65,00,63,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,\
  00,69,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00

3 Remove Run as administrator from Context Menu of MSI Files

This is the default setting


A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Remove_Run_as_administrator_from_MSI_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Msi.Package\Shell\runas]

4 Save the REG file to your desktop.

5 Double click/tap on the downloaded REG file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 You can now delete the downloaded REG file if you like.


That's it,
Shawn Brink


 

Attachments

  • MSI.png
    MSI.png
    10.7 KB · Views: 61
  • Add_Run_as_administrator_to_MSI_context_menu.reg
    691 bytes · Views: 224
  • Remove_Run_as_administrator_from_MSI_context_menu.reg
    266 bytes · Views: 182
Last edited:
Back
Top Bottom