Subscribe to Windows IT Pro
October 23, 2000 12:00 AM

The Win2K Command Prompt Window

Windows IT Pro
InstantDoc ID #15733
Rating: (0)
Win2K delivers new command-line power

In Windows 2000, Microsoft has made some long-overdue changes to the command-line interface. The Command Prompt menu item is on the Accessories submenu in Win2K, so if you're a command junkie, move the shortcut to a more convenient place. To do so, drag a copy of the shortcut to the Start menu or to the Quick Launch toolbar. You can also type

cmd

in the Run box to open a Command Prompt window.

Customizing a Command Prompt Window
In Win2K, the Control Panel Console applet that was available in Windows NT is gone. Instead, you use a Command Prompt window's drop-down menu to customize the window. Right-click the window's title bar to access the menu, which Figure 1, page 170, shows.

To customize the window, you can use either the Defaults or Properties menu item. Regardless of which option you select, the resulting Properties dialog box shows the same tabs with the same choices. However, each command affects your system differently.

Changing the Defaults dialog box settings permanently changes the default settings for all Command Prompt windows. The changes you make aren't enabled in the current window, but you'll see them in windows you subsequently open.

Changing the Properties dialog box settings changes the settings only for the current window, and the changes take effect immediately. However, after you modify the dialog box settings and click OK, you can choose to make your changes permanent for any Command Prompt window you open from the same source. For example, if you used a specific shortcut (e.g., the Start menu shortcut or a desktop shortcut you created) to open a Command Prompt window and made changes in the Properties dialog box, those changes appear in the next Command Prompt window you open from the same shortcut icon. If you typed

cmd

in the Start menu's Run dialog box to open a Command Prompt window, every time you use that method, your changes appear in the Command Prompt window you open. However, changes on a shortcut-by-shortcut basis are difficult to track, so if you know you want to change a Command Prompt window, change the default settings.

The Properties dialog box displays four tabs. The Layout, Colors, and Fonts tabs offer options you can use to change a Command Prompt window's size, appearance, and contents. The real power is on the Options tab, which Figure 2, page 170, shows, because this tab lets you change the window's behavior (e.g., Cursor Size, Command History, Display Options, Edit Options).

Cursor Size. Use the Cursor Size options to change the size of the blinking cursor. Small is an underline, Medium is a small square, and Large is a square that is the same size as the font.

Command History. The Command History group box offers three options. Buffer Size is the number of commands that the buffer stores. The Number of Buffers represents the number of processes that can maintain history buffers. Select the Discard Old Duplicates check box to have the system automatically eliminate duplicate commands in the buffer history. However, if you frequently execute a particular series of commands in the same order, retaining the duplicates can be handy.

Display Options. Use Display Options to change the size of a Command Prompt window from Window (the default setting) to Full Screen. To toggle between Window and Full Screen while you're working in the window, press Alt+Enter.

Edit Options. Instead of using a Command Prompt window menu's Edit command, you can choose QuickEdit Mode to copy and paste text automatically. Select Insert Mode to insert text at a command prompt instead of overwriting existing text. If you're not a terrific typist, this option is handy because you can back up through a command and correct your errors without retyping everything.

Using the Command Prompt Window
You can copy text from a Command Prompt window, but you can't cut text. To copy text when you've enabled QuickEdit Mode, drag your mouse to select text, then press Enter to place the text on the Clipboard. If you haven't enabled QuickEdit Mode, right-click the window's title bar, choose Edit from the drop-down menu, then select Mark. Drag your mouse to select the text, or position your cursor at the beginning of the text you want to copy and hold down the Shift key while you click the end of the selection. Press Enter to place the selected text on the Clipboard.

To paste text at a command prompt, position your cursor where you want to insert the text. If you've enabled QuickEdit Mode, right-click to automatically paste the text. If you haven't enabled QuickEdit Mode, right-click and select Paste from the pop-up menu that appears. If you prefer to use the keyboard instead of a mouse, press Alt+Space and then use e for enter and p for paste.

Related Content:

ARTICLE TOOLS

Comments
  • Anonymous User
    7 years ago
    Feb 09, 2005

    how do i get thrugh the schools network to command prompt

  • Stefan Tomic
    8 years ago
    Mar 11, 2004

    Excellent suggestions for improving some sorely needed functionality for the windows command line. I came across a couple of issues that involved a little bit of guesswork on my part (I try to stay away from the registry when possible, so some other folks may be quicker with these issues). Both of the following issues concern adding the "Open A Command Window" functionality.

    There is no Directoryshell key, this appears to be a typo. shell is a subkey of Directory, so this should read HKEY_CLASSES_ROOT\\Directory\\shell key.

    Also, my registry editor did not create default items as the article mentioned, so I needed to create these strings. To do this, I selected "Add Value", left the Value Name blank with a type of "REG_SZ". Then on the following String Editor window, entered the appropriate command. I found that if I didn't leave the Value Name blank that the command did not work.

    Anyway, hope these suggestions saves someone some time.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.