Purpose: | Start a program in another session or window |
Format: | START ["title"] [/= /AFFINITY=n /ABOVENORMAL /BELOWNORMAL /BREAKAWAY /COLOR=BF /DESKTOP=name /ELEVATED /Env /Env=file /FEEDBACK=off|on /HIGH /LOW /JOB=jobname /NOPINNING /NORMAL /PARENTAFFINITY /REALTIME /VDESKTOP=id /B /C /K /Dpath /I /Idle=n /INV /MAX /MIN /NODE n /POS=x,y,width,height /L /LA /LD /LF /LH /MONITOR=n /P /RUNAS user password /SIZE=rows,cols /TAB /TABNA /UNELEVATED /WAIT /WIN /PGM ] "progname" [command] |
title | Title to appear on title bar |
path | Startup directory |
progname | Program name (not the session name) |
command | Command to be executed by progname |
Priority |
Local functions |
||
Multiple CPUs |
Local history list |
||
No new console |
Priority |
||
Priority |
Maximized window |
||
Break away from job |
Minimized window |
||
Close when done |
Monitor to use |
||
Default console colors |
NUMA node |
||
Startup directory |
Don't pin to taskbar |
||
Start desktop |
Priority |
||
Start as admin |
/P |
Start process suspended |
|
Use user default environment |
Inherit parent's affinity |
||
Custom environment |
Program name |
||
Cursor feedback mode |
Position of window |
||
Priority |
Priority |
||
Inherit environment |
Run as other user |
||
Wait for input idle |
Screen buffer size |
||
Invisible window |
Start in Take Command tab window |
||
Start process in job |
Start in inactive Take Command tab |
||
Keep when done |
Start app unelevated |
||
Local lists |
Start on the specified virtual desktop |
||
Local aliases |
For session to finish |
||
Local directory history |
Windowed session |
See also: DETACH.
Usage:
START is used to begin a new session, and optionally run a program in that session. If you use START with no parameters, it will begin a new TCC session. If you add a command, START will begin a new session or window and execute that command.
START will return to the TCC prompt immediately (or continue a batch file), without waiting for the program to complete, unless you use /WAIT.
If title is included, it will appear on the task list and Alt-Tab displays instead of the program name. Title must be enclosed in double quotes, and cannot exceed 127 characters. Title will be ignored if you also specify /ELEVATED.
START always assumes that the first quoted string on the command line is the title. If there is a second quoted string it is assumed to be the command. As a result, if the name of the program you are starting contains white space (and must therefore be quoted), and you don't specify a title, START will interpret the first quoted string as the title, not the command. To address this, use the /PGM switch to indicate explicitly that the quoted string is the program name, or include a title before the program name. For example, to start the program C:\Program Files\Proc.Exe you could use either of the first two commands below, but the third command would not work:
Valid
start /PGM "C:\Program Files\Proc.Exe"
start "test" "C:\Program Files\Proc.Exe"
Invalid
start "C:\Program Files\Proc.Exe"
Numeric input may be entered in either decimal format (a sequence of 0-9 digits) or in hexadecimal format ("0x" followed by a sequence of 0-F hex digits).
START offers a large number of switches to control the session you start. In most cases you need only a few switches to accomplish what you want. The list below summarizes the most commonly used START options, and how you can use them to control the way a session is started.
Window controls: /MAX, /MIN, and /POS allow you to start a character-mode windowed session in a maximized window, a minimized window, or a window with a specified position and size, respectively. /INV starts an invisible window. /B starts the program in the current console window. The default is /WIN, which permits Windows to choose the position and size of the non-maximized window. If you start a graphics mode program, only /MAX and /POS are effective, and the position and size information associated with /POS is ignored. Windows will use the size, but not the position of the same program when last used in RESTORE mode. If you want to control the window size and placement of a graphics mode program, use the ACTIVATE command after the window has been opened.
Session priority: The options /ABOVENORMAL, /BELOWNORMAL, /HIGH, /LOW, /NORMAL and /REALTIME allow you to select the new session's priority.
Program controls.
If progname is in the "App Paths" registry (either HKCU or HKLM), its associated "Path" value (if it exists) is inserted into the beginning of the PATH in the environment inherited by the program.
If progname is the name of a directory instead of an executable program, TCC will start your default Windows shell (usually Windows Explorer) in the specified directory.
Progname inherits the environment as it exists when START is executed, unless /I is used to select the default environment.
If progname specifies TCC.EXE, the options /L, /LA, /LD, /LF and/LH provide control over the use of local or global lists. See details below.
The initial directory for progname is the current default directory, unless otherwise specified using the /D option.
When command is finished, /C closes the session (the default for Windows sessions), while /K keeps it and displays the prompt (the default for character mode sessions).
The Process ID of the detached session or program is returned in the _STARTPID internal variable.
Options:
/AFFINITY=n | On multiple processor machines, set the processor affinity for this process. /AFFINITY takes a hex argument for the processor mask -- i.e., to set the affinity for cpu's 1 and 3, set /AFFINITY=5. If you also specify a NUMA node (see /NODE), the process is restricted to running on those processors in common between the specified affinity mask and the NUMA node. If no processors are in common, the process is restricted to running on the specified NUMA node. |
/BREAKAWAY | The child process is not associated with the TCC job (see JOBS). This requires that TCC is running in a job with the breakaway option enabled.. |
/COLOR=BF | Set the default color for the new console window. B is the background color (hex 0-F) and F is the foreground color (hex 0-F). |
/D | Specifies the startup directory. Include the directory name immediately after the /D, with no intervening spaces or punctuation. |
/Env="filename" | Creates a new environment for the process using the contents of filename. The format of filename is: |
var1=value1
var2=value2
...
Because some Windows API calls will fail if there is no "SystemRoot" variable in the environment, TCC will add the existing SystemRoot value to the new environment if wasn't specified in filename.
OFF - The feedback cursor is forced off while the process is starting (the normal select cursor is displayed).
/Idle=n | Waits until the started process to finish processing its initial input and is waiting for user input, or until the timeout period has elapsed. n specifies the timeout period in milliseconds. |
/INV | Start the session or window as invisible. No icon will appear and the session will only be accessible through the Task Manager or Window List. |
/JOB=jobname | Start the new process in the specified job (see JOBS). Cannot be used with /RUNAS. |
/K | Start the program in a new TCC window and keep the TCC window open when the program ends. (Use the EXIT command to close the TCC window.) |
/L | Start TCC with local alias, function, history and directory history lists. This option is equivalent to specifying all of /LA, /LD, /LF, and /LH (below). |
/LD | Start TCCwith a local directory history list. See Local and Global History Lists for information on local and global directory history lists. |
/LF | Start TCC with a local function list. See FUNCTION for information on local and global function lists. |
/LH | Start TCC with a local history list. See Local and Global History Lists for information on local and global history lists. |
/MONITOR=n | Start the program on the specified monitor (1 to n). This will only work with apps that do not try to position their window at startup, and you cannot combine this switch with /POS. |
/NODE n | Start the program using the specified NUMA node (n is a decimal integer). See also /AFFINITY. |
/POS=left,top,width,height | Start the window at the specified screen position. The top left corner of the screen is 0,0. |
/RUNAS user@domain password .
If "domain" is not specified, the local database is checked for the username. If you specify * for the password, START will prompt you to enter the password. (Useful when you don't want to put the password in a batch file.) /RUNAS cannot be used in combination with /ELEVATED.
If the user name begins with ".\" (without the quotes) , TCC will substitute the computer name for the ".".
/SIZE=rows,columns | Specifies the screen buffer size. Rows is the number of text rows and columns is the number of text columns. (This is not the size of the session's window.) |
/UNELEVATED | Start the program in an unelevated session. (Only necessary if TCC is running in an elevated session and you want to start a process unelevated.) |
/WIN | Start the new console session as a window (this is the default.) See also /B. |