Posts Tagged ‘run as different user command line’

3 Ways to Run App as Different User in Windows 10

August 29th, 2016 by Admin

How can you run a script or application as another user? In this tutorial we’ll show you 3 ways to run apps as different user in Windows 10.

Method 1: Shift + Right-Click Context Menu

Open File Explorer and browse to the executable file you wish to run as different user. Simply hold down the Shift key and right-click on the executable file, select Run as different user from the context menu.

shift-run-as-different-user

Next you have to enter the user name and the password of the user which we want use to open the application.

enter-user-credentials

Method 2: Run as Different User via Command Line

Runas is a very useful command in Windows. This command allows to run applications under a different user account, even as an Administrator. To use the Runas command, you need to provide a different user’s credentials and the full path of the application you want to run.

For example, if you want to open Notepad as your Windows user Bob, the command line would be as below.
runas /user:Bob “C:\Windows\notepad.exe”

runas-cmd

After running the above command, you will be asked to enter the password of Bob account. After password validation, Notepad will be opened with the specified account credentials.

Method 3: Run as Different User via Start Menu

If you want to run apps as different user from Start Menu in Windows 10, you need to tweak the Group Policy setting.

  1. Press the Windows + R key combination to bring up the Run box, type gpedit.msc and hit Enter.
  2. In the Local Group Policy Editor window, navigate to:
    User Configuration\Administrative Templates\Start Menu and Taskbar
  3. In right-side pane, double-click on the policy called Show “Run as different user” command on Start.

    run-as-different-user-gpo

  4. Set the policy to Enabled, then click OK to save your changes.

    show-run-as-different-user

  5. Reboot your computer. Right-click any application on the Start Menu, you’ll see a new option “Run as different user” for quick access.

    rus-as-user-via-start