Easy Steps to Run Programs as a Different User on Windows 10

Easy Steps to Run Programs as a Different User on Windows 10

Running programs as a different user on Windows 10 can be essential for various administrative tasks or when you need to access resources with different credentials. Here are some easy methods to achieve this.

How can I run a program as a different user on Windows 10?​

1. Enable the "Run as different user" Option in Local Group Policy​

  • Open the Run dialog by pressing Win + R.
  • Type gpedit.msc and press Enter to open the Local Group Policy Editor.
  • Navigate to User Configuration > Administrative Templates > Start Menu and Taskbar.
  • Find the policy named Show "Run as different user" command on Start and double-click it.
  • Set the policy to Enabled.
  • Click Apply and then OK.
  • Close the Group Policy Editor and restart your computer for the changes to take effect.
By enabling this policy, you can add the "Run as different user" option to the Start menu, making it easier to run applications under different user credentials.

2. Enable Secondary Logon Service​

  • Open the Run dialog by pressing Win + R.
  • Type services.msc and press Enter to open the Services window.
  • Scroll down and find the Secondary Logon service.
  • Right-click on Secondary Logon and choose Properties.
  • Set the Startup type to Automatic.
  • Click Start if the service is not already running.
  • Click Apply and then OK.
Enabling the Secondary Logon service ensures that you can use the "Run as different user" feature without any issues, as it is necessary for this functionality.

3. Use the context menu​

  1. Hold the Shift key and right-click on the app on your Taskbar or desktop.
  2. Select Run as a different user from the context menu.
  3. Enter the username and password of the user account.
  4. Click OK.

4. Add Registry Keys to Enable "Run as Different User"​

  • Open the Run dialog by pressing Win + R.
  • Type regedit and press Enter to open the Registry Editor.
  • Navigate to HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer.
  • Right-click in the right pane, choose New > DWORD (32-bit) Value.
  • Name the new DWORD ShowRunasDifferentuserinStart.
  • Double-click the new DWORD and set its value to 1.
  • Click OK and close the Registry Editor.
  • Restart your computer for the changes to take effect.
Adding this registry key will enable the "Run as different user" option in the context menu, allowing you to run programs with different credentials easily.

5. Use the Shift + Right-Click Method​

  • Navigate to the executable file or shortcut of the application you want to run.
  • Press and hold the Shift key.
  • Right-click on the executable file or shortcut.
  • Choose Run as different user from the context menu.
  • Enter the username and password of the account you want to use and click OK.
This method quickly allows you to run an application as a different user without additional configuration.

6. Use Command Prompt​

  1. Open the Start menu by pressing the Win key.
  2. Open the command prompt as an admin. Command Prompt Windows 10
  3. Type the below command and press Enter.runas /user:"Username" "FileLocation"(Replace Username and Filelocation with the actual username and the location of the program)
  4. Type the username and password for the user account in a prompt that appears and press Enter.

7. Check and Adjust Registry Settings for RunAs​

  • Open the Run dialog by pressing Win + R.
  • Type regedit and press Enter to open the Registry Editor.
  • Navigate to the following keys and ensure the values are correct:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer and ensure HideRunAsVerb is set to 0.
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI and ensure EnableSecureCredentialPrompting is set to 0.
  • If these values are not present, create them as DWORD (32-bit) Value and set their values to 0.
  • Restart your computer for the changes to take effect.
Ensuring these registry keys are set correctly will restore the "Run as different user" option if it has been hidden or disabled by policy.
Author
Windows Daily
First release
Last update

More resources from Windows Daily

Top