Windows 7 Forums


Windows 7: Run as Different User


Run as Different User

How to Run a Program as a Different User in Windows 7 and Windows 8
Published 08 Nov 2008
Published by

Featured Tutorial

User Profile - Customize During Installation
User Profile - Customize During Installation

How to Customize Default User Profile in Audit Mode

Microsoft Account Primary Alias Email Address - Change
Microsoft Account Primary Alias Email Address - Change

How to Change your Microsoft Account Primary Alias Email Address

Clean Up Factory Bloatware
Clean Up Factory Bloatware



Windows 7 Installation - Transfer to a New Computer
Windows 7 Installation - Transfer to a New Computer

How to Transfer your Complete Windows 7 Installation to a New Computer

User Profiles - Create and Move During Windows 7 Installation
User Profiles - Create and Move During Windows 7 Installation

How to Create User Accounts on another Partition or Disk During Windows 7 Installation

Dual Boot - Windows 7 and Linux
Dual Boot - Windows 7 and Linux

How to Correctly Setup a Dual Boot with Windows 7 and LinuxMint13
How to Run a Program as a Different User in Windows 7 and Windows 8

information   Information
This will show you how to run a program as if it was running from a different user account on your computer while you are still logged on to your user account in Windows 7 and Windows 8.

Note   Note
This will only affect this instance of the program running, so you can open multiple instances of this progam as a different user per instance. Closing the program will end that program's instance running for that user.



warning   Warning
  • The user account that you want to run the program as must be password protected.
  • The Secondary Logon service needs to be set to Manual and not be disabled. By default, it is set to Manual unless changed.







OPTION ONE
To "Run as different user" using Context Menu
1. Press and hold the Shift key and right click on the program's shortcut or BAT, CMD, EXE, MSC, or MSI file, then click/tap on Run as different user. (See screenshot below)
Run as Different User-context_menu.jpg
2. Type in the user name and password of the user account that you want to run this program as. (see screenshot below)
NOTE: If the user account is on a domain, then you would use UserName@Domain or Domain\UserName for the user name instead.
Run as Different User-log-.jpg
3. If prompted by UAC, then click/tap on Yes.

4. The program will now be running as that user.

5. When done, simply close the program to stop it from running as that user.



OPTION TWO
To "Run as different user" from Start Application Bar

NOTE: This option is only for Windows 8.
1. For how, see: How to Add or Remove "Run as Different User" from Context Menu in Windows 7 and Windows 8
Run as Different User-start.jpg



OPTION THREE
To "Run as different user" using RUNAS Command in Command Prompt


Run as Different User-runas.jpg
1. Open a command prompt.

2. In the command prompt, type the command below, and press Enter. (see screenshot below)
NOTE: You would substitute USER-NAME in the command with the actual name of the user account that you want to run the program as. If the user account is on a domain, then you would use UserName@Domain or Domain\UserName for the user name instead.
runas /user:USER-NAME "C:\full\path\of\Program.exe"

For example, if I wanted to run Notepad as the test user, I would type this command below.

runas /user:test "C:\Windows\system32\notepad.exe"

Run as Different User-example.jpg
3. Type in the password of the user account that you want to run this program as. (see screenshot above)

4. If prompted by UAC, then click/tap on Yes.

5. The program will now be running as that user.

6. When done, simply close the program to stop it from running as that user.







Tip   Tip
To Create a RunAs Shortcut for the Program
OR
  • Open Notepad.
  • Type the command from step 2 above in Notepad.
  • Click on File (menu bar) and Save as in Notepad.
  • Navigate to your desktop.
  • Type in name-you-want.bat, and click on the Save button.
You will now be able to just run this shortcut or .bat file to have the program runas the user you want.

That's it,
Shawn







Need more help? Try searching our extensive help and support site.
Loading
02 Dec 2009   #1
grundmj

Windows 7 Professional
 
 
Run as Different User

Good morning,

In windows xp if you did this you would see that the window is running as an administrator. Is that display no longer available with Windows 7? How do you know that you are running lets say, explorer.exe from an admin account? I have tried the Shift Right Click and selected Run As a Different user and there is nothing showing I am running it as an administrator. Is there a feature I need to enable? Thanks for your help.

My System SpecsSystem Spec

02 Dec 2009   #2
Brink

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

Hello Grundmj, and welcome to Seven Forums.

After your press and hold shift and right click and click on "Run as different user", do you not get a log on dialog box??

You will be able to tell what user the program is running as through Task Manager (Ctrl+Shift+Esc) under the Processes tab in the User-name column with the user account name that it is running as.
My System SpecsSystem Spec
14 Dec 2009   #3
grundmj

Windows 7 Professional
 
 

Hello Brink,

We do get that dialog box, and when we login with Admin Credentials it opens a seperate Window. When the user trys to complete items in the Windows it says permissions denied and it worked in XP. Just trying to figure out what the cause would be. Thanks
My System SpecsSystem Spec
.


14 Dec 2009   #4
Brink

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

Hello Grundmj,

Run as administrator would be different than "Run as Different User". You should be able to right click on the application, and click on "Run as administrator". If you are not in a administrator account, it would then ask you for that computer administrator's user name and password.
My System SpecsSystem Spec
07 Jan 2010   #5
Opportunitor

Windows 7 Ultimate (64 Bit) - Version 6.1
 
 

The function 'Run as different user', when holding Shift, doesn't appear to me. Which Registry-key may be added to fix this option?
My System SpecsSystem Spec
07 Jan 2010   #6
Brink

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

Hello Opportunitor, and welcome to Seven Forums.

Are you in a administrator account? Is this with all or one program or program shortcut that it's not available for?
My System SpecsSystem Spec
21 Jan 2010   #7
ilps2009

Win7 Ultimate 64
 
 

I have a question that is a slight variation from the above.

How can you store the desire to run as a different user in the desktop shortcut as we were able to do in XP?
In XP you could right click on the shortcut icon, select properties, advanced option in the Shortcut tab of properties let you choose an option to run with different credentials. I may have missed it, but I see nothing similar in 7.
My System SpecsSystem Spec
21 Jan 2010   #8
Brink

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

Hello Ilps,

You might be able to create a script or batch file that may allow this, but I'm uncertain as to how to do this if it's possible.
My System SpecsSystem Spec
21 Jan 2010   #9
ilps2009

Win7 Ultimate 64
 
 

Thanks Brink!

Yes, that is how I solved it a couple weeks ago. For example, here is the target command to run Admin for AD Users & Computers (which is why I need the functionality):
C:\Windows\System32\runas.exe /noprofile /user:domain\username "mmc %SystemRoot%\system32\dsa.msc"
Just did not make sense that MS would revoke such a useful and seemingly benign capability. I had to be missing something. Go figure!
My System SpecsSystem Spec
Comment

 Run as Different User problems?



Tutorial Tools



Similar help and support threads for: Run as Different User
Windows 7 Tutorial Category
Solved iTunes & sounds keep playing even when user logs off using Switch user General Discussion
Solved Created admin User but can see on 'Switch User" cntrl/alt/del System Security
Solved Moving user folders; User picture error Customization
Solved The User Profile Service Failed the Login/User Prof. cannot be loaded General Discussion
Strange Defult Login User Prompt - Local Admin, Not Domain User General Discussion


All times are GMT -5. The time now is 03:02 AM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32