Accounts Run as different user in Windows 11


  • Staff
Run_as_different_user_banner.png

This tutorial will show you how to use Run as different user 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.

Run as different user will only affect the current instance of the running .bat, .cmd, .exe, .msc, or .msi file. You can open multiple instances of the file with each instance running as a different user.


Run as different user will not be available for Microsoft Store apps.



Contents





Option One

"Run as different user" in File Explorer


1 Perform the following actions: (see screenshots below)
  1. Right click on a .bat, .cmd, .exe, .msc, or .msi file you want on the desktop (Win+D) or in File Explorer (Win+E).
  2. Press and hold the Shift key.
  3. Right click on Show more options.
  4. Release the Shift key.
  5. Click/tap on Run as different user.
Show_more_options.png
Run_as_different_user.png

2 Enter the credentials of the user you want to run as, and click/tap on OK. (see screenshots below)

Windows_Security-1.png
Windows_Security-2.png





Option Two

"Run as different user" from Taskbar


1 Perform the following actions: (see screenshot below)
  1. Right click on an app (ex: "Registry Editor") icon on the taskbar.
  2. Press and hold the Shift key.
  3. Right click on the app (ex: "Registry Editor") in the jump list.
  4. Release the Shift key.
  5. Click/tap on Run as different user.
Run_as_different_user_taskbar-1.jpg

2 Enter the credentials of the user you want to run as, and click/tap on OK. (see screenshots below)

Windows_Security-1.png
Windows_Security-2.png





Option Three

"Run as different user" from Start menu


This option is only available if you enabled "Run as different user" context menu on Start menu.


1 Open the Start menu :win:, and click/tap on the All apps button. (see screenshot below)

Start_from_All_apps.jpg

2 Perform the following actions: (see screenshot below)
  1. Right click on an app (ex: "Google Chrome") in All apps.
  2. Click/tap on More.
  3. Click/tap on Run as different user.
Run_as_different_user_on_Start_menu-min.jpg

3 Enter the credentials of the user you want to run as, and click/tap on OK. (see screenshots below)

Windows_Security-1.png
Windows_Security-2.png





Option Four

"Run as different user" using Command


1 Open Windows Terminal, and select either Windows PowerShell or Command Prompt.

2 Type the command below you want to use into Windows Terminal, and press Enter. (see screenshots below)

runas /user:"<username>" "Full path of file"

OR​

(To save credentials and use saved credentials of user)​
runas /user:"<username>" /savecred "Full path of file"

Substitute <username> in the commands above with the actual user name of the account you want to run as. If this is for a domain user, then you would enter their user name using one of these parameters: UserName@DomainName or DomainName\UserName

Substitute Full path of file in the commands above with the actual full path of the .bat, .cmd, .exe, .msc, or .msi file you want to run as the user.


3 Type the password of the user you want to run as, and press Enter.

You will not see the text of the password as you enter it.

If you had previously used the command above with the /savecred switch for the same user, then you will not be prompted to enter the user's password since it was saved in Credential Manager last time.

Credential_Manager.png


Run_as_different_user_command-1.png

Run_as_different_user_command-2.png



That's it,
Shawn Brink


 

Attachments

  • Run_as_different_user.png
    Run_as_different_user.png
    17.4 KB · Views: 199
Last edited:

Latest Support Threads

Back
Top Bottom