Runas

In computing,   (a compound word, from “run as”) is a command in the Microsoft Windows line of operating systems that allows a user to run specific tools and programs under a different username to the one that was used to logon to a computer interactively. It is similar to the Unix commands  and , but the Unix commands generally require prior configuration by the system administrator to work for a particular user and/or command.

Microsoft Windows
The  command was introduced with the Windows 2000 operating system. Any application can use this API to create a process with alternate credentials, for example, Windows Explorer in Windows 7 allows an application to be started under a different account if the shift key is held while right clicking its icon. The program has the ability to cache verified credentials so that the user only ever has to enter them once.

Syntax
The command-syntax is:

Parameters
This section is paraphrased from the  command.
 * : Speeds up the loading of the application by skipping the loading of the user's profile. Note that this might not speed up every application.
 * : Do not skip loading the user's profile. This is the default setting.
 * : Use the actual environment, not the user's.
 * : Specifies that the given credentials are to be used for Remote access only.
 * : Credentials saved by the previous user. This setting is not available on Windows 7 Home or Windows 7 Starter Edition. This setting is left out from Windows XP Home Edition as well.
 * : Specifies that the credentials will be supplied from a smartcard.
 * : Format is either  or.
 * : Shows help (list of usable trust level parameters) for the /trustlevel switch.
 * : One of the trust levels listed by the /showtrustlevels switch.
 * : Command line for the executable file. See examples below.

Note: Only type in the user's password, when the system asks for it.

Note: The  switch is not compatible with the   switch.

Note: The  and the   switches may not be used together.

Inferno
The command is also included in the Inferno operating system.

Syntax
writes the  to   and invokes   with the given arguments.

Note: The command is only invoked if setting of the username succeeds.