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.
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.
3. Use the context menu
- Hold the Shift key and right-click on the app on your Taskbar or desktop.
- Select Run as a different user from the context menu.
- Enter the username and password of the user account.
- 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.
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.
6. Use Command Prompt
- Open the Start menu by pressing the Win key.
- Open the command prompt as an admin.
- 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)
- 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.