The command line that starts TCC will typically include the program name with drive and path, followed by any options. For example:
"c:\program files\jpsoft\tcmd17\tcc.exe" @c:\jpsoft\tcmd.ini
Although the startup command line is usually very simple, you can add several options. You can do this manually in the Windows RUN dialog, in a Windows shortcut file (.LNK), at the TCC prompt or in a batch file (with or without using the internal START command). Each of these methods will start a new instance of the selected command processor, which will run in a new window, except when TCC is started from TCC (either at the command prompt or within a batch file) without the START command.
When you use a pipe in a command, either at the command prompt or in a batch file, TCC starts another instance of itself, using the same command line parameters (except as required for the pipe).
The complete syntax for the TCC startup command line is (all on one line):
d:\path\tcc.exe [d:\path] [[/]@d:\path\inifile] [//directive=value...] [/A /H /I[IPSX]/L: /LA /LD /LF /LH /N/Q /S /T:bf /U /V /X ] [/C | /K] [command]
Do not include the square brackets shown in the command line above. They are there to indicate that the items within the brackets are optional. Some options are available only in specific products; see below for details.
If you include any of the options below, you should use them in the order that they are described. If you do not do so, you may find that they do not operate properly.
The command line must start with the path and name of the executable program file (TCC.EXE):
The additional items below may be included on the command line:
If included, this second copy d:\path of TCC path must be identical to d:\path in the command line segment above. It sets the drive and directory where the program is stored, called the COMSPEC path. This option is included for compatibility with other character mode command processors, but is not needed in normal use. TCC can find its own directory without a COMSPEC path.
This option sets the path and name of the .INI file. You don't need this option if
|1)||your .INI file is named TCMD.INI, and|
|2)||it is in one of the following directories:|
|2.1)||the same directory as TCC|
|2.2)||the "%programdata%\JP Software\Take Command 24" directory|
|2.3)||the %localappdata% directory|
This option is most useful if you want to start the program with a specific and unique .INI file.
To get around a Windows limitation that causes the displayed command line of a shortcut to be truncated when a parameter begins with @, you can use the alternative syntax
TCC will skip the leading slash.
This option tells TCC to treat the text appearing between the // and the next space or tab as a directive. The directive should be in the same format as a line in the .INI file, but may not contain spaces, tabs, or comments. This option may be repeated. It is a convenient way to place a few simple directives on the startup line without having to modify or create a new .INI file.
Directives on the command line override any corresponding directive in the .INI file.
|/A||This option causes the output of internal commands to a pipe or redirected to a file to be in ASCII when TCC starts. This is the default value, and isn't necessary unless you want to override a Unicode Output configuration option.|
|/B||This option tells TCC that you do not want it to set up a Ctrl-C / Ctrl-Break handler.|
Warning: It may cause the system to operate incorrectly if you use this option without other software to handle Ctrl-C and Ctrl-Break. This option should be avoided by most users.
|/D||Disable execution of AutoRun commands from Registry. If /D is not specified when TCC starts, it will look for and execute the following registry variables:|
and / or
See also the AutoRun configuration option.
|/H||Start TCC in a hidden window. The window will not appear on the task bar, or in the Alt-tab list of applications.|
|/I||Don't load the .INI file, execute TCSTART or TCEXIT, or load plugins. You can optionally specify individual arguments:|
|/II||Don't load the .INI file.|
|/IL||Don't load the default library functions.|
|/IP||Don't load plugins.|
|/IS||Don't execute TCSTART.|
|/IX||Don't execute TCEXIT.|
|/L||Forces the use of local lists as the default for aliases, functions, directory history and command history, overriding any configuration options. This method allows you to use global lists as the default, but start a specific session with local aliases, functions and histories. See the topics ALIAS, FUNCTION, and Local and Global History Lists for more details.|
|You can optionally specify individual arguments:|
|/LA||Forces the use of local aliases.|
|/LD||Forces the use of a local directory history.|
|/LF||Forces the use of local functions.|
|/LH||Forces the use of a local command history list.|
|/N||If TCC was started as a service, use the /N option to prevent TCC from being closed on a Windows CTRL_LOGOFF_EVENT.|
|/Q||Don't display version / copyright message (registered copies only).|
|/S||CMD.EXE-compatible quoted string handling.|
|/T:bf||This option sets the foreground and background colors in the TCC command window. Both b and f are hexadecimal digits. b specifies the background color and f specifies the foreground color. This option is included only for compatibility with CMD. See the CMD color codes in Colors, Color Names & Codes.|
In most cases you should set default colors with the corresponding Output Colors configuration option. If you use both, the /T switch overrides the configuration options.
|/U||This option causes the output of internal commands to a pipe or redirected to a file to be in Unicode when TCC starts. The command :|
OPTION //UnicodeOutput=yes | no
may be used at any time to switch between Unicode and ASCII output.
|/U8||This option causes the output of internal commands to a pipe or redirected to a file to be in UTF-8 when TCC starts. The command :|
OPTION //UTF8Output=yes | no
may be used at any time to switch between UTF-8 and ASCII output.
|/V||Tells TCC to handle the CMD syntax !varname! as a delayed expansion of %varname. Since CMD, unlike TCC, doesn't support delayed expansion of variable references in the %varname% format, it introduced a special !varname! notation. Using /V simply tells TCC to handle that syntax as an alternative to %varname% or %varname or %[varname].|
|/X||This option forces TCC to alter the operation of the MD (MKDIR) command to automatically create all necessary intermediate directories when it creates a new subdirectory. Its effect is the same as adding a /S option to all MD (MKDIR) commands. This option is included for compatibility with CMD, where it also enables other options. However, in TCC those options are already enabled by default.|
/C command or
/K command or
|Only one of these options may be used to specify for TCC what it must do after startup, and what it should do after completing command. Command will be executed after the automatic TCC startup program TCSTART, but before a prompt is displayed. Command may be any valid alias, internal or external command, or batch file, including parameters.|
All other startup options must be placed before command, because TCC will treat characters after command as parameters for command and not as additional startup options.
If command is preceded by /C, TCC will execute command and then exit, returning to the parent program or the desktop without displaying a prompt.
The /K switch has no effect. Using it is the same as placing command (with neither /C nor /K) at the end of the startup command line. It is included only for compatibility with CMD.
Assume that you execute the command line below:
The events below will take place in the order shown:
|1||Windows starts c:\TCC\TCC.exe|
|2||TCC initializes from|
1st choice: c:\TCC\TCMD.INI
2nd choice: TCMD.INI in the "%programdata\JP Software\Take Command 26" directory
3rd choice: TCMD.INI in the %localappdata% directory.
|3.1||If the initialization file was found, and it contains the directive|
and one of the files
exists, that file is executed by TCC.
|3.2||If no initialization file was found in Step 2, or the initialization file either does not contain the TCStartPath directive, or the value of the directive is c:\TCC, and a TCSTART program is found in directory c:\TCC, it is executed by TCC|
|4||TCC executes c:\tcmd\start.btm (or, if not found, it displays an error message).|
|5||TCC displays the command prompt, unless an EXIT command was executed in c:\tcmd\start.btm, terminating TCC.|
The command line below, when executed by TCC, CMD, the RUN dialog, or a shortcut, will start TCC, select local aliases, execute any TCSTART file you have created, execute the file PROCESS.BTM, and exit. No prompt will be displayed by this session:
c:\tcmd13\tcc.exe /la /c c:\tcmd13\process.btm