Starting and Ending a Command Prompt Session

To get to the command prompt, run Cmd. exe, which you can do in any of the following ways:

• Type cmd in the Start menu search box, and click the Cmd shortcut when it appears, under Programs, at the top of the menu.

• Press Windows logo key+R, and type cmd in the Open box.

• Choose Start, All Programs, Accessories, Command Prompt.

• Double-click the Cmd icon in your %SystemRoot%\System32 folder.

• Double-click any shortcut for Cmd. exe .

You can open as many Command Prompt windows as you like. With each additional window, you start another Command Prompt session . For example, you might want to open two Command Prompt windows to see two directories in side-by-side windows . To open another Command Prompt window, repeat any of the preceding methods, or type start or start cmd at the command prompt. (These commands produce the same result. If you don't type a program name after typing start, Windows assumes that you want to start Cmd . exe.)


Your activities in a Command Prompt session are subject to the same User Account Control (UAC) restrictions as anything else you do in Windows 7. At times, you might find it convenient to start a Command Prompt session with an administrator token; such a session is sometimes called an elevated command prompt. To do this, right-click any shortcut for Cmd .exe and choose Run As Administrator from the shortcut menu. If you do this as a standard user, you will be prompted to supply administrative credentials


Easy ways to invoke administrator Command Prompt sessions

A quick way to open a Command Prompt session as an administrator is to press the Windows logo key (to open the Start menu), type cmd in the Start menu search box, and press Ctrl+Shift+Enter.

If you often need a Command Prompt session with administrator privileges, create a shortcut to Cmd .exe, open the shortcut's properties dialog box, click the Shortcut tab, click Advanced, and select Run As Administrator.

It's a good idea to visually differentiate this high-powered Command Prompt session from others so that you'll know at a glance that you're using a more powerful session—power that comes with the potential to cause damage . Windows inserts the word Administrator in the title bar of each Command Prompt window that has administrator privileges. You can also make the window visually distinctive by applying different fonts and colors; for details, see "Customizing Command Prompt Windows" on page 970.

When the Command Prompt window is active, you can end a Command Prompt session in any of the following ways:

• Type exit at the command prompt.

• Click the Control menu icon, and choose Close

• Double-click the Control menu icon

If you are running a character-based program in the Command Prompt window, you should use the program's normal exit command to quit the program before attempting to close the window and end the Command Prompt session . Otherwise, it's possible that you'll lose unsaved data. However, if you are sure that the program doesn't have any unsaved information, you can safely and quickly close it using one of the last three methods in the preceding list. If a program is running, a dialog box appears asking whether or not you really want to terminate the program.

Was this article helpful?

0 0
Digital Cancers

Digital Cancers

Get All The Support And Guidance You Need To Be A Success At Protecting Your PC. This Book Is One Of The Most Valuable Resources In The World When It Comes To The Damaging Facts About Computer Viruses.

Get My Free Ebook

Post a comment