Copyright 1997 Pragma Systems, Inc
runas.exe
The RunAs program runs a program as a different user, requiring the correct domain, user name, and password. The user will be prompted for any required value that was not entered on the command line.
To run a program using RunAs the following guidelines should be met:
Full path must be given for the program name.
Long directory path names are not supported by the RunAs program. For example, "d:\first sector\files\dot.exe" will not work because of the space.
If no program name is given, command prompt is run.
The .exe program can have from none to two arguments.
Required User Privileges: the interactive user, the user running Runas, must have the following advanced user rights
Act as part of the operating system
Replace a process level token
After assigning these privileges, the machine must be reboot for them to take affect.
USAGE:
runas /U username /P password /D domainname /E exename /A arguments [/W] [/I] [/?]
COMMAND OPTIONS:
/U username Gets user name as input
/P password Gets new password as input
/D domainname Gets domain name as input
/E exename Gets program (.exe) name with full path
/A arguments Arguments to pass program. This MUST be the last argument on the command line.
/I Interactive Mode
/W WAIT for Process Exit
/? Displays text help file
EXAMPLES:
To run a program using username "John", and be prompted for password, domain name & program name, type:
runas /U John
To run a program using the password and username for the different user and be prompted for domain & program type:
runas /P password /U John
NOTE: If the password is typed as a command line argument, it will NOT be concealed. To keep the password private, enter it when it is prompted for.
To run a program by giving the domain for the different user, and be prompted for username, password & program type:
runas /D domainname
To run a program using the program name (".exe") for the different user, and be prompted for username, password & domain, type:
programs without arguments--
runas /E d:\window\programs\notepad.exe
programs with arguments--
runas /E d:\window\programs\userinfo.exe /U username
To activate interactive mode, type:
runas /I