Name
Run As —
\windows\system32\runas.exe
Synopsis
Run a program under a different user’s account.
To Open
Command Prompt →
runas
Usage
runas [/noprofile] [/env] [/netonly] /user:username
program
runas [/noprofile] [/env] [/netonly] /smartcard runas [/noprofile] [/env] [/netonly] /smartcard [/user:username
]program
Description
Windows XP is a multiuser environment. When you open an application, Windows runs that program in a “user context,” which means that the settings and capabilities imposed upon an application are those associated with your user account. Use Run As to instruct Windows to open an application in another user’s context. This is especially useful when running services or other background applications, where you can’t always assume which user will be logged on at any time, but you want to make sure the settings and permissions are correct.
Run As takes the following parameters:
-
program
The full path, filename, and optional command-line parameters for the
.exe
file to run.-
/user:
username
The username under which to run
program
;username
should be of the formuser
@
domain
ordomain
\
user
.-
/noprofile
Specifies that the user’s profile should not be loaded. This causes the application to load more quickly, but can cause those applications that rely on settings stored in the
HKEY_CURRENT_USER
registry key to malfunction.-
/env
Uses the current environment instead of
username
’s.-
/netonly
Specifies that the credentials specified are for remote access only.
-
/savecred
Get Windows XP in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.