Accounts Add or Remove "Run as different user" context menu in Explorer in Windows 11


  • Staff
Run_as_different_user_banner.png

This tutorial will show you how to add or remove the Run as different user context menu in File Explorer for all users in Windows 11.

Run as different user allows a user to run a .bat, .cmd, .exe, .msc, or .msi file as a different user. This allows running the .bat, .cmd, .exe, .msc, or .msi file with the same permissions and rights as the different user instead of the user account they are currently signed in to.

To use Run as different user in File Explorer, you would normally have to right click on the .bat, .cmd, .exe, .msc, or .msi file, press and hold the Shift key, right click on Show more options, release the Shift key, and click/tap on Run as different user.

The Run as different user context menu is not available in the Start menu by default, but it can be added.

Run as different user does require you to enter the credentials of the user you want to run as.


You must be signed in as an administrator to add or remove the "Run as different user" context menu.



EXAMPLE: "Run as different user" context menu in File Explorer

Show_more_options.png
Run_as_different_user.png

Windows_Security-1.png
Windows_Security-2.png



Here's How:

1 Do step 2 (add) or step 3 (remove) below for what you want.

2 Add Right Click "Run as different user" context menu in File Explorer

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

Add_Run_as_different_user_context_menu.reg


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

[HKEY_CLASSES_ROOT\batfile\shell\runasuser]
@="@shell32.dll,-50944"
"Extended"=-
"SuppressionPolicyEx"="{F211AA05-D4DF-4370-A2A0-9F19C09756A7}"

[HKEY_CLASSES_ROOT\batfile\shell\runasuser\command]
"DelegateExecute"="{ea72d00e-4960-42fa-ba92-7792a7944c1d}"


[HKEY_CLASSES_ROOT\cmdfile\shell\runasuser]
@="@shell32.dll,-50944"
"Extended"=-
"SuppressionPolicyEx"="{F211AA05-D4DF-4370-A2A0-9F19C09756A7}"

[HKEY_CLASSES_ROOT\cmdfile\shell\runasuser\command]
"DelegateExecute"="{ea72d00e-4960-42fa-ba92-7792a7944c1d}"


[HKEY_CLASSES_ROOT\exefile\shell\runasuser]
@="@shell32.dll,-50944"
"Extended"=-
"SuppressionPolicyEx"="{F211AA05-D4DF-4370-A2A0-9F19C09756A7}"

[HKEY_CLASSES_ROOT\exefile\shell\runasuser\command]
"DelegateExecute"="{ea72d00e-4960-42fa-ba92-7792a7944c1d}"


[HKEY_CLASSES_ROOT\mscfile\shell\runasuser]
@="@shell32.dll,-50944"
"Extended"=-
"SuppressionPolicyEx"="{F211AA05-D4DF-4370-A2A0-9F19C09756A7}"

[HKEY_CLASSES_ROOT\mscfile\shell\runasuser\command]
"DelegateExecute"="{ea72d00e-4960-42fa-ba92-7792a7944c1d}"


[HKEY_CLASSES_ROOT\Msi.Package\shell\runasuser]
@="@shell32.dll,-50944"
"Extended"=-
"SuppressionPolicyEx"="{F211AA05-D4DF-4370-A2A0-9F19C09756A7}"

[HKEY_CLASSES_ROOT\Msi.Package\shell\runasuser\command]
"DelegateExecute"="{ea72d00e-4960-42fa-ba92-7792a7944c1d}"

3 Remove "Run as different user" context menu in File Explorer

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

Remove_Run_as_different_user_context_menu.reg


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

[-HKEY_CLASSES_ROOT\batfile\shell\runasuser]

[-HKEY_CLASSES_ROOT\cmdfile\shell\runasuser]

[-HKEY_CLASSES_ROOT\exefile\shell\runasuser]

[-HKEY_CLASSES_ROOT\mscfile\shell\runasuser]

[-HKEY_CLASSES_ROOT\Msi.Package\shell\runasuser]

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

  • Run_as_different_user.png
    Run_as_different_user.png
    17.4 KB · Views: 103
  • Add_Run_as_different_user_context_menu.reg
    3 KB · Views: 374
  • Remove_Run_as_different_user_context_menu.reg
    910 bytes · Views: 239
Last edited:
I've recently put Windows 11 22H2 on some machines and I added the registry changes shown here, which I used in Windows 10. I still have to press SHIFT to get the Right Click menu to come up on the Windows 11 boxes ---- what should I check ???
 

My Computer

System One

  • OS
    Windows 11 / Windows 10
I've recently put Windows 11 22H2 on some machines and I added the registry changes shown here, which I used in Windows 10. I still have to press SHIFT to get the Right Click menu to come up on the Windows 11 boxes ---- what should I check ???

Hello, and welcome. :alien:

I'm afraid this is normal in Windows 11 unless you disable having to click on Show more options first.

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
Back
Top Bottom