How to run a program as a different user (RunAs) in Windows

To run a program as a different user in Windows, hold Shift, right-click the program's .exe file or shortcut, select Run as different user, and enter the other account's user name and password.

The same job can be done with the runas command, PowerShell's Start-Process, a saved shortcut or a Start menu option, and the troubleshooting sections cover a missing menu item and Access is denied errors.

How to run a program as a different user in Windows 11 and 10

  1. Find the program's .exe file or shortcut on the desktop or in File Explorer.
  2. Hold Shift and right-click it.
  3. Select Run as different user. On Windows 11, select Show more options first if the short menu opens.
  4. Enter the account as DOMAIN\user, user@domain or COMPUTER\user, then type its password.
  5. Select OK. The program opens under that account while you stay signed in as yourself.

This relies on the Secondary Logon service. If the option fails or never appears, the service or a policy is usually the cause.

Run a program as a different user from the Shift right-click menu
Holding Shift while you right-click a program shortcut opens the full menu with Run as different user under Run as administrator. (Image: Microsoft Q&A)

How to run apps as different user from File Explorer

File Explorer offers the option for programs (.exe), saved MMC consoles (.msc), shortcuts to them and Control Panel items. Some items, such as the Printers folder and desktop items, open indirectly and cannot be run this way.

  1. Press Win + E to open File Explorer.
  2. Browse to the program, for example C:\Windows\System32\mmc.exe or an app folder under Program Files.
  3. Hold Shift, right-click the file and select Run as different user.
  4. In the sign-in box that opens, type the other account's user name and password.
  5. Select OK and wait for the program to open.

A program stored on a network share can fail to start this way when the other account cannot reach that share. Copy the program locally or give the account access to the share.

RunAs command: Run a program under a different user from CMD

runas is built into Windows. Open Command Prompt, type the command with the account and program, and enter the password when prompted. The password is never typed on the command line.

runas /user:COMPUTERNAME\administrator cmd
runas /user:contoso\domainadmin "mmc %windir%\system32\compmgmt.msc"
runas /user:[email protected] "notepad my_file.txt"
runas /netonly /user:OTHERDOMAIN\admin "mmc %windir%\system32\dsa.msc"

The first line opens Command Prompt as the local Administrator account. The second opens Computer Management as a domain admin. The third opens Notepad with a file as another domain user. /netonly uses the account only for network access, which suits managing a server in another domain or forest.

You should see: Command Prompt shows Enter the password for …, and the program opens after you type it.

Wrap the program and any arguments in quotes as one string, as in the compmgmt.msc example.

Runas command switches explained

Switch What it does
/user:<name> The account to use, in user@domain or domain\user form
/profile Loads the user's profile. This is the default; not allowed with /netonly
/noprofile Skips loading the profile so the program starts faster; some programs then misbehave
/env Uses your current environment instead of the other user's
/netonly Uses the credentials for remote access only; not allowed with /profile
/savecred Uses credentials this user saved earlier; not allowed with /smartcard
/smartcard Takes the credentials from a smart card
/showtrustlevels Lists the trust levels you can pass to /trustlevel
/trustlevel Runs the program at a chosen authorization level
/? Shows help in Command Prompt

Using RunAs in PowerShell

PowerShell can call runas directly, but Start-Process gives two native ways to start a program under another account.

  1. Open Windows PowerShell.
  2. Run Start-Process -FilePath "notepad.exe" -Credential (Get-Credential) and enter the other account in the sign-in box.
  3. Store the account once for several commands: $cred = Get-Credential contoso\admin, then Start-Process -FilePath "mmc.exe" -ArgumentList "compmgmt.msc" -Credential $cred.
  4. To get the same Run as different user prompt as File Explorer, run Start-Process -FilePath "notepad.exe" -Verb RunAsUser. The RunAsUser verb works for .exe and .cmd files.
  5. To call the classic tool from PowerShell, run runas /user:contoso\admin "powershell.exe".

-Verb RunAs is a different verb: it elevates the program as administrator under your own account instead of switching to another user.

How to use RunAs without password prompt?

The /savecred switch saves the other account's password the first time you enter it, and later runs reuse it without asking. Anyone who can use your Windows session can then start any program as that account.

  1. Open Command Prompt as your normal account.
  2. Run runas /savecred /user:contoso\appuser "C:\Apps\Tool\tool.exe".
  3. Type the account's password once when prompted.
  4. Run the same command again. It starts the program without asking for the password.
  5. To stop it, open Control Panel > Credential Manager > Windows Credentials and remove the saved entry for that account.

/savecred cannot be combined with /smartcard. Avoid saving a domain admin password this way on a shared PC.

How to run a program as a different user (RunAs) in Windows
Saved runas /savecred passwords appear under Windows Credentials in Control Panel's Credential Manager; remove the entry to stop reuse. (Image: Microsoft)

How to create a shortcut to run as a different user

  1. Right-click the desktop and select New > Shortcut.
  2. In Type the location of the item, enter runas /user:contoso\appuser "C:\Apps\Tool\tool.exe".
  3. Add /savecred after runas if the shortcut should stop asking for the password after the first run.
  4. Select Next, name the shortcut, and select Finish.
  5. Right-click the shortcut, select Properties > Change Icon, and browse to tool.exe to give it the program's icon.
  6. Double-click the shortcut. A Command Prompt window asks for the password, then the program opens.

To start the program this way at sign-in, put the shortcut in your Startup folder or follow the usual steps to make a program run on startup. Use /savecred there, or the password prompt will wait at every sign-in.

Add "Run as" option to Start menu in Windows 10

By default Start does not offer Run as different user. The policy Show "Run as different user" command on Start adds it for apps that support it on Windows 10 and Windows 11. The Local Group Policy Editor is not available on Home editions.

  1. Press Win + R, type gpedit.msc and press Enter.
  2. Go to User Configuration > Administrative Templates > Start Menu and Taskbar.
  3. Double-click Show "Run as different user" command on Start.
  4. Select Enabled, then OK.
  5. Sign out and back in, or run gpupdate /force in Command Prompt.
  6. Right-click an app in Start and select Run as different user; on some layouts it sits under More.

The policy stores its setting as ShowRunAsDifferentUserInStart under HKCU\Software\Policies\Microsoft\Windows\Explorer. Shift + right-click on a taskbar jump list still offers the command even when the policy is off.

Add Run as different user to Start with the Windows 11 For developers toggle
Windows 11 also offers this as a switch: Settings > System > For developers > File Explorer, no Group Policy Editor needed. (Image: Microsoft Q&A)

How to check which user a program is running as

  1. If you started Command Prompt or PowerShell as the other user, type whoami and press Enter. It prints the account in domain\user form.
  2. For any other program, press Ctrl + Shift + Esc to open Task Manager.
  3. Select Details.
  4. Find the program's .exe in the list and read the User name column.
  5. If the column shows your own account, the program was started normally; close it and start it again with Run as different user.
Check which user a program is running as in Task Manager Details
The User name column on the Details tab shows the account each process runs under, such as SYSTEM or LOCAL SERVICE. (Image: Microsoft)

Run as different user vs Run as administrator

Run as different user Run as administrator
Account used Another account you name Your own account, elevated
Credentials asked for The other account's user name and password Consent, or an admin password for a standard user
Command line runas /user:<name> <program> Start-Process <program> -Verb RunAs
Profile and settings The other user's profile, unless /noprofile Your own profile
Group Policy Not processed for the other account Your own policy applies
Typical use Admin tools under a separate admin account, testing another user's access Changing system settings from your own account

Windows does not process Group Policy for the account you run a program as. Settings the program sees come only from that user's existing profile, if one is loaded.

"Run as different user" option is missing in Windows

No Run as different user in the right-click menu

On Windows 11 the short context menu hides it, or you right-clicked without holding Shift.

  1. Hold Shift while you right-click the .exe file or shortcut.
  2. On Windows 11, select Show more options to open the full menu.
  3. Right-click the program's .exe file rather than a Start or Store tile.

Option removed by policy on a work PC

An administrator set HideRunAsVerb to 1 under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer, or blocked runas.exe with AppLocker or Software Restriction Policies.

  1. Ask your IT department whether the restriction is intentional.
  2. On your own PC, open Registry Editor as administrator and delete the HideRunAsVerb value from that key.
  3. Sign out and back in.

Option missing from Start only

Start shows the command only when the Show "Run as different user" command on Start policy is enabled.

  1. Enable the policy in User Configuration > Administrative Templates > Start Menu and Taskbar.
  2. Run gpupdate /force, then right-click the app in Start.

Option appears but nothing happens

The Secondary Logon service is disabled.

  1. Press Win + R, type services.msc and press Enter.
  2. Double-click Secondary Logon.
  3. Set Startup type to Manual or Automatic, select Start, then OK.

Runas access is denied or not working

Access is denied after a Windows Server upgrade

The upgrade left the wrong permissions on the Secondary Logon service, so a standard user cannot start it.

  1. Sign in as an administrator and open Command Prompt as administrator.
  2. Run net stop seclogon.
  3. Reset the service permissions with the sc sdset seclogon command in Microsoft's KB 977513, typed as one line.
  4. Try runas again as the standard user.

Runas fails with a user name or password error

The account name is in the wrong form, or the account cannot sign in to this computer.

  1. Use COMPUTER\user for a local account and DOMAIN\user or user@domain for a domain account.
  2. Test the account by signing in with it once.
  3. Confirm the Secondary Logon service is running.

Program opens but cannot see network drives or files

The other account has its own drive mappings and permissions, and may not reach the same share.

  1. Use the full UNC path such as \\server\share instead of a mapped drive letter.
  2. Give the other account permission on the share.
  3. Use runas /netonly when the program should run locally as you but authenticate to the network as the other account.

Policy settings do not apply inside the program

Windows does not process Group Policy for an account used with runas. This is by design.

  1. Sign in interactively with that account once so its profile picks up policy.
  2. Do not use /noprofile if the program needs settings from that profile.

Run as different user FAQ

What is the shortcut for Run as different user?

There is no single keyboard shortcut. Hold Shift and right-click the program's .exe file or shortcut, then select Run as different user. On Windows 11, select Show more options if the short menu appears first.

Can runas open a program as administrator?

Yes. Run runas /user:COMPUTERNAME\administrator cmd for the local Administrator account, or runas /user:DOMAIN\admin for a domain admin. To elevate your own account instead, use Run as administrator or Start-Process -Verb RunAs.

Can I run a program as another user without the password?

Only after the password has been entered once with runas /savecred, which stores it for later runs by your account. Windows has no supported way to start a program as another user whose password you never supply.

What does runas /netonly do?

It runs the program locally under your own account but uses the account you name for network access only. It suits managing a server in another domain or forest, and it cannot be combined with /profile.

Why is Run as different user greyed out or missing for Store apps?

Start offers the command only for applications that support it, and only when the Show Run as different user command on Start policy is enabled. For an app that lacks it, Shift + right-click its .exe file in File Explorer instead.

Which service does Run as different user need?

It needs the Secondary Logon service (seclogon). If that service is disabled or its permissions are wrong, runas and Run as different user fail, often with Access is denied.

Does runas load the other user's profile?

Yes, by default. /profile is the default behaviour, and /noprofile skips loading the profile so the program starts faster, at the risk of some programs not working correctly without their settings.

How do I run PowerShell as a different user?

Run runas /user:DOMAIN\user powershell.exe from Command Prompt, or Start-Process powershell.exe -Credential (Get-Credential) from an existing PowerShell window. Type whoami in the new window to confirm the account.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

Your email address will not be published. Required fields are marked *