|
|
||
| Purpose: | Start a program in another session or window. |
| Format: | START ["title"] [ /AFFINITY=n /ABOVENORMAL /BELOWNORMAL /ELEVATED /HIGH /LOW /NORMAL |
/REALTIME /B /C /K /Dpath /I /FS /INV /MAX /MIN /POS=x,y,width,height /L /LA /LD /LF /LH /MONITOR=n
/RUNAS user password /SEPARATE /SHARED /SIZE=rows,cols /TAB /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 history list |
||
Multiple CPUs |
Priority |
||
No new console |
Maximized window |
||
Priority |
Minimized window |
||
Close when done |
Monitor to use |
||
Startup directory |
Priority |
||
Start as admin |
Program name |
||
Full screen window |
Position of window |
||
Priority |
Priority |
||
Inherit environment |
Run as other user |
||
Invisible window |
Separate session |
||
Keep when done |
Shared session |
||
Local lists |
Screen buffer size |
||
Local aliases |
Start in Take Command tab window |
||
Local directory history |
For session to finish |
||
Local functions |
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.
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: /FS, /MAX, /MIN, and /POS allow you to start a character-mode windowed session in full screen mode, 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, 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.
If progname is a 16-bit Windows application, by default is starts in a shared virtual machine. You may use the /SEPARATE option to force creation of a unique virtual machine.
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. You cannot specify any other arguments on the command line. (Not available in TCC/LE.) |
| /D | Specifies the startup directory. Include the directory name immediately after the /D, with no intervening spaces or punctuation. |
| /I | Inherit the default (startup) environment, rather than the current environment. (Only supported in Vista and later.) |
| /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. |
| /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. |
| /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.)
| /SEPARATE | Start a 16-bit Windows application in a separate virtual machine. Normally, all 16-bit Windows applications are started in the same virtual machine, see /SHARED.. |
| /SHARED | Start a 16-bit Windows application in the shared virtual machine (default). See also /SEPARATE. Included only for compatibility with CMD. |
| /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.) |