" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#008000" VLINK="004000" ALINK="#00C000">
COMMAND (Secondary Command Processor)
Purpose: Starts the Secondary Command Processor.
Syntax: [d:][path]COMMAND [/F] [/D] [/P] [/E:xxxxx] [/Cstring]
Parameters:
[d:][path] - disk and directory, from where DOS should load Command
Processor. If COMMAND.COM file is absent in the specified
directory, DOS finds the path in its own environment. The
COMMAND.COM loads the Command Processor from a directory,
defined by the COMSPEC= sequence during system initiation.
/F - always sets Fail in the handler of critical errors.
/D - cancels the mode set by the previous parameter.
/P - new command processor should constantly stay in the memory.The
usage the /P parameter means, that the control will not go back
to the primary command processor. The secondary command
processor may only be disactivated by restarting DOS.
[/Cstring] - allows to execute "string" and to give the control
automatically back to the primary Command Processor, if the /P
parameter was not specified. String is a command, which the
secondary command processor should execute. The command is
interpreted and executed as if it has been run from the DOS
prompt. For example, typing:
A>command /c dir b:
will load a secondary command processor which executes the
dir b: command and returns the control to the primary
command processor.
Including the following line in the CONFIG.SYS configuration
file:
SHELL = Command Com. /P /C AUTOCALL.BAT
will give an alternative name to the AUTOEXEC.BAT file, which
is run automatically during system loading, where AUTOCALL.BAT
is the name of a batch file that will be executed during
initial system boot.
/E:xxxx - is a decimal integer number, that determines the length of the
environment (parameters, defining the configuration of the
processor). The number should be in the range from 160 to
32768 and it is rounded up to the nearest paragraph boundary
(16 bytes).
Running the COMMAND command without parameters loads a new copy of the
command processor. This copy gets the environment of the command processor
of the previous level. Changing the environment of a secondary command
processor (by the SET command ) has no influence upon the environment of the
primary command processor. The return of the control to the primary command
processor restores the environment, which existed prior to loading the
second command processor.
Example:
Suppose the initial command processor uses DOS standard prompt $p$g (by
default). The secondary command processor inherits this prompt. If you
change this prompt for another one during the work of the secondary command
processor, then after return to the initial command processor the prompt
will still remain $n$g. After loading of a secondary command processor with
no parameters, the primary command processor could be re-activated with the
help of the special command EXIT.