RUNAS

2008 Oct 18


Name RUNAS
Ver 2000
Launch a process as though a different user and their privileges apply. It allows privileged users to execute programs in a nonprivileged way.
Syntax RUNAS [/profile] [/env] [/netonly] /user:UserName Program
Optional
Parameters
and Switches
/profile If the user's profile needs to be loaded.
/env To use the current environment instead of user's.
/netonly Use if the credentials specified are for remote access only.
/user should be in form USER@DOMAIN or DOMAIN\USER
program Command line for EXE (see examples).
Exit Codes
ERRORLEVEL Value
Meaning
0
Notes 1) Enter user's password only when prompted.
2) USER@DOMAIN is not compatible with /netonly.
Examples > runas /profile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""
See also

2005-2008