• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Run As\windows\system32\runas.exe

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 form user@domain or domain\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

Uses credentials previously saved by the user. This option is not available on Windows XP Home Edition and will be ignored.


/smartcard

Specifies that the credentials are to be supplied from a smartcard.

Notes

Scheduled Tasks, discussed later in this chapter, also lets you run programs under different user accounts.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint