Windows 7 / Getting Started

Running CMD

When you open a Command Prompt window,Windows starts the CMD.EXE program. CMD prompts for commands and executes them, until you close the window or type the exit command.There are several ways to open a Command Prompt window:

  • Click Start, All Programs, Accessories, Command Prompt.
  • On Windows 7, open a Command Prompt window as just described, right-click its icon in the task bar, and select Pin This Program to Taskbar.The icon is now always available.
  • Click Start, and type cmd in the Search box.When the cmd.exe result appears, press Enter or click it.
  • On Windows XP, or if you have customized the Start menu to show the Run command, click Start, click Run, type cmd, and press Enter.

You can change the properties of any of these shorcuts to preset the initial working directory. By default, it's your account's user profile folder.

Tip: You can also start a Command Prompt window from any Windows Explorer view, with a folder preselected as the current directory. This is a handy trick to know. In Windows 7 and Vista, hold down Shift, right-click a folder name in any Windows Explorer view, and select Open Command Window Here. On Windows XP, search for "Open Command Open Here Power Toy" and install it. This gives you Open Command Prompt Here as a right-click option on any folder without holding down the Shift key.

You can also open additional Command Prompt windows from the command line or from batch files, if there's a need.To open a new window from the command prompt, type start cmd.You can alter CMD's behavior by specifying additional command-line arguments.

Tip: A good time to open an additional Command Prompt window is when you need to perform privileged administrative tasks. Describe this in the next section.

[Previous] [Contents] [Next]