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


  • Staff
Run_as_different_user_banner.png

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.

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


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



Contents

  • Option One: Add or Remove "Run as different user" context menu in File Explorer for All Users using REG file
  • Option Two: Add or Remove "Run as different user" context menu on Start Menu for All or Specific Users in Local Group Policy Editor
  • Option Three: Add or Remove "Run as different user" context menu on Start Menu for All Users using REG file


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

Show_more_options.png
Run_as_different_user.png
Run_as_different_user_on_Start_menu-min.jpg

Windows_Security-1.png
Windows_Security-2.png





Option One

Add or Remove "Run as different user" context menu in File Explorer for All Users using REG file


1 Do step 2 (add), step 3 (add Shift), or step 4 (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 5 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. Add Shift + Right Click "Run as different user" context menu in File Explorer

This is the default setting.


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

Add_Shift_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}"


 4. 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 5 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]

5 Save the REG file to your desktop.

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

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

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




Option Two

Add or Remove "Run as different user" context menu on Start Menu for All or Specific Users in Local Group Policy Editor


The Local Group Policy Editor is only available in the Windows 11 Pro, Enterprise, and Education editions.

All editions can use Option Three to configure the same policy.


1 Open the all users, specific users or groups, or all users except administrators Local Group Policy Editor for how you want this policy applied.

2 Navigate to the policy location below in the left pane of the Local Group Policy Editor. (see screenshot below)

User Configuration > Administrative Templates > Start Menu and Taskbar

Run_as_different_user_gpedit-1-min.png

3 In the right pane of Start Menu and Taskbar, double click/tap on the Show "Run as different user" command on Start policy to edit it. (see screenshot above)

4 Do step 5 (add) or step 6 (remove) below for what you would like to do.

5 Add "Run as different user" context menu on Start Menu

A) Select (dot) Enabled, click/tap on OK, and go to step 7 below. (see screenshot below)​

Run_as_different_user_gpedit-3-min.png

6 Remove "Run as different user" context menu on Start Menu

This is the default setting.


A) Select (dot) Not Configured, click/tap on OK, and go to step 7 below. (see screenshot below)​

Run_as_different_user_gpedit-2-min.png

7 You can now close the Local Group Policy Editor if you like.




Option Three

Add or Remove "Run as different user" context menu on Start Menu for All Users using REG file


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


2 Add "Run as different user" context menu to Start Menu for All Users

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

Add_Run_as_different_user_on_Start.reg


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

[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer]
"ShowRunAsDifferentUserInStart"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer]
"ShowRunasDifferentuserinStart"=dword:00000001


3 Remove "Run as different user" context menu from Start Menu for All Users

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_different_user_on_Start.reg


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

[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer]
"ShowRunAsDifferentUserInStart"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer]
"ShowRunasDifferentuserinStart"=-

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 Either restart the explorer process, sign out and sign in, or restart the computer to apply.

8 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: 25
  • Add_Run_as_different_user_context_menu.reg
    3 KB · Views: 100
  • Add_Shift_Run_as_different_user_context_menu.reg
    3 KB · Views: 84
  • Remove_Run_as_different_user_context_menu.reg
    910 bytes · Views: 77
  • Add_Run_as_different_user_on_Start.reg
    892 bytes · Views: 77
  • Remove_Run_as_different_user_on_Start.reg
    840 bytes · Views: 64
Last edited:
Top Bottom