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:usernameprogramrunas [/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
.exefile to run.-
/user:username The username under which to run
program;usernameshould be of the formuser@domainordomain\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_USERregistry key to malfunction.-
/env Uses the current environment instead of
username’s.-
/netonly Specifies that the credentials specified are for remote access only.
-
/savecred
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access