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
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
Download
(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
Download
(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
Last edited: