Tuesday, June 29, 2010

Using ShellRunas to run programs 'as different user' in Windows 7 without shift+right clicking

Download Sysinternals ShellRunas from http://technet.microsoft.com/en-us/sysinternals/cc300361.aspx, save it in C:\Windows\System32 (or %systemroot%\system32), and then prefix the 'Target' field in the application's shortcut with %systemroot%\System32\ShellRunas.exe.

Example:
%systemroot%\System32\ShellRunas.exe "C:\Program Files (x86)\testprogram\test.exe"

alternative method using the old 'runas' command:
runas.exe /user:Domain\Username "C:\Program Files (x86)\testprogram\test.exe"

you can throw /savecred when using runas to save the credentials the first time the shortcut is run, and then to launch using those saved credentials thereafter.

credit: http://social.technet.microsoft.com/Forums/en/w7itproui/thread/bb1480cf-c920-4d83-b889-4654f5713c8f

No comments:

Post a Comment