Command Prompt | \ windows \system32\cmd.exe |
Start All Programs Accessories Command Prompt
The command prompt is a simple application in which you type commands rather than pointing and clicking. It provides access to programs and utilities otherwise inaccessible and even permits the use of some advanced file management functions. Chapter 6 fully documents the command prompt and supported commands. Cmd accepts the following parameters:
cmd [/q][/d] [/a/u] [/e:onoff][/f:onoff] [/v:onoff] /t: fg [[/s][/c/k] string ]
Option | Description |
---|---|
string | When used with /c or /k , specifies a command to be carried out when the command prompt is first opened. Multiple commands are separated by && , and string , as a whole, is surrounded by quotation marks. String must be the last parameter on the command line. |
/c | Carries out the command specified by string and then stops. |
/k | Carries out the command specified by string and continues. |
/s | Strips any quotation marks in string. |
/q | Turns the echo off; see Echo in Chapter 6. |
/d | Disables execution of AutoRun commands. Without /d, any programs or commands listed in the Registry keys, HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun and HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun are executed every time a command prompt window is opened. |
/a | Formats all output so that it is ANSI-compliant. |
/u | Formats all output so that it is Unicode-compliant. |
/e:onoff | Enables or disables command extensions (the default is on). |
/f:onoff | Enables or disables file and directory name completion (the default is off). |
/v:onoff | Enables or disables delayed environment variable expansion (the default is off). |
/t: fg | Sets the foreground and background colors ( f and g , respectively) of the command prompt window. The single-digit values for f and g are as follows : 0=Black, 1=Blue, 2=Green, 3=Aqua, 4=Red, 5=Purple, 6=Yellow, 7=White, 8=Gray, 9=Light blue, A=Light green, B=Light aqua, C=Light red, D=Light purple, E=Light yellow, and F=Bright white. |
TIP
Also included with Windows XP is command.com , the command prompt used in Windows 9x/Me. It's used similarly to cmd.exe , but has limited support of long filenames and other XP features. Command.com is included for legacy purposes only, and should be avoided; cmd.exe is the preferred command prompt in Windows XP. |