IN2BI, Microsoft Business Intelligence
data, stories & insights
rss | email | twitter

Run as Different User

As a consultant I often need to run a program as a different user. For future reference I collected the information about RunAs in this article.

In Windows 7 en Windows Server 2008R2 you can run an application as a different user  by holding down the shift key and right clicking the application shortcut.


To use this functionality in windows 8 you need some extra steps to configure it. These steps are described by Taylor Gibb in: How to Run Windows 8 Apps as a Different User from the Start Screen

Another option is to use the ShellRunAs utility that is provided by the Windows Sysinternals website. If you install this utility you can right-click on a shortcut and select “Start as different user”.

Runas Command

You can also use the runas command line tool from a command prompt or in a .bat file as in these examples:

%windir%\System32\runas.exe /netonly /user:domain\username "C:\Program Files\Microsoft SQL Server\110\Tools\Binn\VSShell\Common7\IDE\Ssms.exe”

This will prompt you for the password of “domain\user” and open Sql Server Management Studio. The \netonly parameter means that the provided identity will be used only with a remote resource the remote site will authenticate you as 'domain\username'.

As an alternative, first ask for the user name and use the input in the runas command:

set /P user="Type the domain\username: "
%windir%\System32\runas.exe /netonly /user:%user% "C:\Program Files\Microsoft SQL Server\110\Tools\Binn\VSShell\Common7\IDE\Ssms.exe”

» Similar Posts

  1. Create a LightSwitch Application to Maintain Metadata
  2. SQL Server, SSIS, SSAS and SSRS on ONE Server
  3. 8 Practical BIML Tips

» Trackbacks & Pingbacks

    No trackbacks yet.

» Comments

    There are no comments.

Comments are closed