Purpose:Start a program in another session or window

 

Format:START ["title"] [/= /AFFINITY=n /ABOVENORMAL /BELOWNORMAL /BREAKAWAY /COLOR=BF /DESKTOP=name /ELEVATED /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 /RUNAS user password /SIZE=rows,cols /TAB /TABNA /UNELEVATED /WAIT /WIN /PGM ] "progname" [command]

 

titleTitle to appear on title bar
pathStartup directory
prognameProgram name (not the session name)
commandCommand to be executed by progname

 

/ABOVENORMAL

Priority

/LF

Local functions

/AFFINITY

Multiple CPUs

/LH

Local history list

/B

No new console

/LOW

Priority

/BELOWNORMAL

Priority

/MAX

Maximized window

/BREAKAWAY

Break away from job

/MIN

Minimized window

/C

Close when done

/MONITOR

Monitor to use

/COLOR

Default console colors

/NODE

NUMA node

/D

Startup directory

/NOPINNING

Don't pin to taskbar

/DESKTOP

Start desktop

/NORMAL

Priority

/ELEVATED

Start as admin

/PARENTAFFINITY

Inherit parent's affinity

/Env

Custom environment

/PGM

Program name

/FEEDBACK

Cursor feedback mode

/POS

Position of window

/HIGH

Priority

/REALTIME

Priority

/I

Inherit environment

/RUNAS

Run as other user

/Idle

Wait for input idle

/SIZE

Screen buffer size

/INV

Invisible window

/TAB

Start in Take Command tab window

/JOB

Start process in job

/TABNA

Start in inactive Take Command tab

/K

Keep when done

/UNELEVATED

Start app unelevated

/L

Local lists

/VDESKTOP

Start on the specified virtual desktop

/LA

Local aliases

/WAIT

For session to finish

/LD

Local directory history

/WIN

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:

 

/=Display the START command dialog to help you set the filename and command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.

 

/ABOVENORMALSet the priority above normal.        
/AFFINITY=nOn 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.

 

/BThe program is started without creating a new window or console, i.e. in the TCC window. Normally, the application is started in its own window. For compatibility with CMD, /B also disables Ctrl-C processing for the program.

 

/BELOWNORMALSet the priority below normal.

 

/BREAKAWAYThe 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..

 

/CStart the program in a new TCC window and close the TCC window when the application ends.

 

/COLOR=BFSet 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).

 

/DSpecifies the startup directory. Include the directory name immediately after the /D, with no intervening spaces or punctuation.

 

/DESKTOPSpecify the window station and desktop where the app should be started. If you don't enter a backslash (\), the argument is assumed to be the desktop on WINSTA0 where you want the app to start.

 

/ELEVATEDStart the program elevated, with full admin privileges. /ELEVATED cannot be used in combination with /RUNAS. If you specify /ELEVATED, any title on the command line will be ignored (this is a Windows limitation).

 

/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.

 

/FEEDBACK=on|offON - The cursor is in feedback mode for two seconds after the process is started, and the "Working in Background" cursor is displayed. If during those two seconds the process makes the first GUI call, the system gives five more seconds to the process. If during those five seconds the process shows a window, the system gives five more seconds to the process to finish drawing the window. The system turns the feedback cursor off after the first call to GetMessage, regardless of whether the process is drawing.

 

OFF  - The feedback cursor is forced off while the process is starting (the normal select cursor is displayed).

 

/HIGHStart the window at high priority.

 

/IInherit the default (startup) environment, rather than the current environment.

 

/Idle=nWaits 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.

 

/INVStart 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=jobnameStart the new process in the specified job (see JOBS). Cannot be used with /RUNAS.

 

/KStart 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.)

 

/LStart TCC with local alias, function, history and directory history lists. This option is equivalent to specifying all of /LA, /LD, /LF, and /LH (below).

 

/LAStart TCC with a local alias list. See ALIAS for information on local and global alias lists.

 

/LDStart TCCwith a local directory history list. See Local and Global History Lists for information on local and global directory history lists.

 

/LFStart TCC with a local function list. See FUNCTION for information on local and global function lists.

 

/LHStart TCC with a local history list. See Local and Global History Lists for information on local and global history lists.

 

/LOWStart the window at low priority.

 

/MAXStart the session or window maximized.

 

/MINStart the session or window minimized.

 

/MONITOR=nStart 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 nStart the program using the specified NUMA node (n is a decimal integer). See also /AFFINITY.

 

/NOPINNINGAny windows created by the new process cannot be pinned on the taskbar.

 

/NORMALStart the window at normal priority.

 

/PARENTAFFINITYThe process inherits its parent's affinity.

 

/PGMThe quoted string following this option is the program name. Any additional text beyond the quoted string is passed to the program as its parameters, so to use other START switches you must place them before /PGM which must be the last option for START. You can use /PGM to allow START to differentiate between a quoted long filename and a quoted title for the session.

 

/POS=left,top,width,heightStart the window at the specified screen position. The top left corner of the screen is 0,0.

 

/REALTIMEStart the window at realtime priority.

 

/RUNASRun a command in the context of the specified user. The syntax is:

 

 /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,columnsSpecifies 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.)

 

/TABStart the command in a new TCC tab window, and activate the new window. The command will usually be a Windows console mode application, but Take Command can also run many simple GUI applications in a tab window (provided the application does not have multiple parent windows).

 

/TABNAStart the command in a new TCC tab window, but don't activate the new window.

 

/UNELEVATEDStart the program in an unelevated session. (Only necessary if TCC is running in an elevated session and you want to start a process unelevated.)

 

/VDESKTOP=idStart the app on another virtual desktop. id can be either a desktop number (1-n), the GUID for that desktop, or the desktop name. See VDESKTOP for more details. Note that Windows doesn't have an API to actually start on another desktop, so TCC starts it on the local desktop and them immediately moves it -- you'll see a flash when the window starts and then disappears.

 

/WAITWait for the new session or window to finish before continuing.

 

/WINStart the new console session as a window (this is the default.) See also /B.