Many times there is a need for opening multiple instances of the same application with a different UserID, like if you need to connect to different servers/databases using SQL Server Management Studio (SSMS), then we need to open multiple instances of SSMS with different logins etc.
Few Operating Systems like Windows 7 etc. have this feature out of the box (Shift Right click on the Application listed in All Programs and you will get an option as Run as a Different User in the context menu in Windows 7). But in some of the Server Editions etc. you may not have this option. Irrespective of the option which you are using, you can use the below option to Open multiple instances of the same Application, each with different credentials/logins.
To open multiple instances of the same application we can use RUNAS Command.
C:\>runas /profile/user:Domain\UserID “Fully Qualified App/Executable Path”
Here is an example for opening SQL Server Management Studio.
Type the following command on Command Prompt and Hit Enter.
C:\>runas /profile /user:Learning\Datta “D:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe”
You will be prompted to enter the password for the account used (in this case it is “Learning\Datta“). Enter the password and Hit Enter.
This opens up SQL Server Management Studio under the account “Learning\Datta“.
Note: Please note that when you enter the password the letters or equivalent number of asterisks will not be visible to you.
This example illustrates a simple usage of the RUNAS Command. RUNAS Command offers various options/switches for specifying parameters which might be useful at times.
The same approach can be used to open multiple instances of most of the applications in windows.