How to run a script or application as a different user in Windows Server 2008

In Windows Server 2003, you could right-click on an application or batch script and select "run as..." to select a different user to run the application under.  This feature is not part of Windows Server 2008 by default. It is included in later versions of Windows Server R2, but not as obvious to use.

If you are using Windows Server 2008 R2, or just wish to see if this is already enabled, you need to press SHIFT as you right-click on the application you wish to run.  If it is enabled you will see an option "Run a different user..." where you can then select the user you wish to run the application as.

If you don't see the option, there is a Microsoft Sysinternals component that you can download and install on your server to enable this feature. The tools is called ShellRunas as is available from Microsoft Sysinternals at the following location:

http://technet.microsoft.com/en-us/sysinternals/cc300361.aspx

 

After downloading the file, unzip it and place the ShellRunas.exe file into your c:\Windows\system32 folder.

Then, open a command prompt and enter the following to register the component:

shellrunas /reg

 

Now when you shift-right-click on an application you will see the option to run it as another user.

Add Feedback