Gammadyne Corporation

LogoSTARTAS.EXE

STARTAS.EXE is a free Windows command-line program that executes a command-line under a different user account.

Usage

STARTAS [/dir"..."] [/hide] [/profile] [/max] [/min] [/w] user password cmdline...


Switches:
/dirSet the current working directory for the process.
/hideThe process's window should be initially hidden.
/profileLoad the user's HKEY_USERS registry key.
/maxThe process's window should be initially maximized.
/minThe process's window should be initially minimized.
/wWait until the process terminates.  The exit code for startas.exe will be the same as the process that was launched.

Exit Code

If the command line was successfully launched, the exit code is 0.  Or, if the /w switch was specified, the exit code for startas.exe will be the same as the process that was launched.

Otherwise, the exit code is one of the following:
-1   A fatal error occurred, such as a bad parameter.
-2   No command line was specified, and so the instructions were displayed.
-3   The command line could not be launched.  The system error was reported.


Example

startas /dir"c:\foo" /profile Gandalf Belloch copy foo.txt bar.txt


Notes

  • The user name can optionally be in the form of "user@domain".
  • Everything after the password is considered to be the command-line to be launched.  Do not enclose the command-line in quotes.
  • The command-line is executed in a separate console window.

Download

Click the button below to download version 3.0 of STARTAS.EXE, released May 29th, 2025.