O'Reilly logo

Windows Server 2003 in a Nutshell by Mitch Tulloch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

cmd

Synopsis

Runs a new instance of the command-line shell.

Syntax

cmd [/a | /u] [/q] [/d] [/e:on | /e:off] [/f:on | /f:off] [/v:on | 
/v:off] [ [/s] [/t:bf] [/c | /k] command]

Options

None

Opens a new command shell.

command

Runs the specified command in the current command shell.

/c

Executes command and then exits the shell. (The remainder of the command following the /c switch is processed as a command line.)

/k

Executes command and continues running the shell. (The remainder of the command following the /k switch is processed as a command line.)

/s

If the first character after /c or /k is a quote and the /s switch is used, strips the leading and final closing quotes and retains any other quotes in the line as part of the command.

/q

Disables local echo.

/d

Disables running AutoRun commands, which are stored in the registry and executed by default whenever cmd is run. The registry locations are:

HKLM\Software\Microsoft\Command Processor\AutoRun
HKCU\Software\Microsoft\Command Processor\AutoRun
/a

Sets output to ANSI.

/u

Sets output to Unicode.

/t:bf

Specifies background and foreground colors using hexadecimal numeric codes of the color command (type color/? for a list of codes).

/e:[on | off]

Enables or disables command-shell extensions (enabled by default), which extend the functionality of the following commands: del (erase), color, cd (chdir), md (mdir), prompt, pushd, popd, set, setlocal, endlocal, if, for, call, shift, goto, start, assoc, and ftype.

/f:[on | off]

Enables or disables filename ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required