Run as different user in Windows 10

    Run as different user in Windows 10

    How to 'Run as different user' in Windows 10
    Published by
    2016-09-15
    Designer Media Ltd

    Published by


    Brink's Avatar
    Administrator

    Posts: 17,399

    Show Printable Version 


    How to 'Run as different user' in Windows 10

    information   Information
    Run as different user allows a user to run .bat, .cmd, .exe, .msc, and .msi files with different permissions than the user's current logon provides.

    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.

    This tutorial will show you how to use Run as different user to run .bat, .cmd, .exe, .msc, and .msi files with different permissions than your account in Windows 10.

    Note   Note
    If the user you use with "Run as different user" doesn't have the appropriate permissions to access the file, then you will get an access is denied type error message like below.
    Name:  Access_denied.png
Views: 1911
Size:  7.5 KB


    CONTENTS:
    • Option One: To "Run as different user" in Context Menu
    • Option Two: To "Run as different user" in Command Prompt





    Run as different user in Windows 10 OPTION ONE Run as different user in Windows 10
    To "Run as different user" in Context Menu

    1. Press and hold the Shift key, right click or press and hold on a .bat, .cmd, .exe, .msc, or .msi file that you want to run as a different user, click/tap on Run as different user, and release the Shift key. (see screenshot below)

    Name:  Run_as_different_user-1.png
Views: 1914
Size:  9.5 KB

    2. Enter the credentials of the user you want to run as, and click/tap on OK.
    Note   Note
    If this is for a domain user, then you would enter their user name using one of the parameters below.
    • UserName@DomainName
    • DomainName\UserName


    Name:  Run_as_different_user-2.png
Views: 1909
Size:  16.2 KB






    Run as different user in Windows 10 OPTION TWO Run as different user in Windows 10
    To "Run as different user" in Command Prompt

    Note   Note
    For more on the usage of the runas command, see: Runas - TechNet Library

    Click image for larger version. 

Name:	runas_usage.png 
Views:	58 
Size:	70.9 KB 
ID:	101565


    1. Open a command prompt.

    2. Enter the command you want to use below into the command prompt, and press Enter. (see screenshots below step 3)

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


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

    Note   Note
    Substitute <username> in the commands above with the actual user name of the account you want to run the file 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. Enter the password of the user, and press Enter. (see screenshots below)
    Note   Note
    You will not see the text of the password as you enter it.

    If you had previously used the command from step 2 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.


    Click image for larger version. 

Name:	Runas_command-1.png 
Views:	47 
Size:	23.2 KB 
ID:	101563
    Click image for larger version. 

Name:	Runas_command-2.png 
Views:	24 
Size:	18.4 KB 
ID:	101564

    4. If you used the command from step 2 with the /savecred switch, then the password you entered in step 3 (if prompted) for the user will be saved in Credential Manager. (see screenshot below)

    Click image for larger version. 

Name:	Credential_Manager.png 
Views:	32 
Size:	44.3 KB 
ID:	101560


    That's it,
    Shawn



  1. Joined : Oct 2016
    Posts : 39
    Microsoft Windows 10 x64
       4 Days Ago #1

    this trick make life easier to run Windows 10 as a "standard user" most of the time (for safety reason)
    but have quick access to administrator rights without entering the password every time

    I have stored my new admin "runas" shortcuts in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\myApps" to get access through the start menu

    thanks Brink
      My System SpecsSystem Spec


  2. Joined : Oct 2013
    Posts : 17,399
    64-bit Windows 10 Pro build 15007
       4 Days Ago #2

    I'm glad it could help Daniel.
      My System SpecsSystem Spec


 


Similar Threads
Tutorial Category
Added User, original user / profile & settings disappeared
Upgraded from Windows 7 to Windows 10 some months ago. Original profile did not require password to log in, and was not associated with a Google email or Microsoft account that I know of. I added a user a couple of days ago (added a personal...
User Accounts and Family Safety
User Prolfile service failed the sign-in user profile cannot be loaded
So I was Dumb and changed the drive that had my user profile to another letter. Now i Can't log in. Please help.
User Accounts and Family Safety
10586 Issue - User Icon deleted leads to User Folder DELETION
On build 10586 I noticed a new Desktop Icon: 'desktop' - solid yellow icon. No need for that on the desktop so I put it in the Recycle Bin and to my amazement a popup appeared - "This folder is too big to recycle, do you want to permanently delete...
General Support
Deleting a user account leaves traces of that user behind in C:\users
I noticed an annoying problem when deleting a user account from your PC. Basically Windows Store app got into a pickle on my main user account. I fixed it with a restore point. But it wasn't working on my wife and son's user accounts. As they...
User Accounts and Family Safety
admin user or any user folder not avaliable in the my computer files
while try to write a path for addons such as a game, there is no user available in the folder is anyone else on windows 10 having this problem?
General Support
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 13:25.
Find Us
Twitter Facebook Google+



Windows 10 Forums