JMU JMU - Department of Computer Science
Help Tools
Configuring the Windows Command Shell (cmd.exe)


1 Introduction

Under Windows 95/98 there is only one command shell, command.com. Under Windows NT/2000/XP there are two, command.com and cmd.exe. You should use cmd.exe.

2 Scroll Bars

To enable scroll bars, right click on the title bar, pull down to Properties and click on the Layout tab. Then, change the "Height" in the "Screen Buffer Size" to something like 250.

3 Quick Edit Mode

To enable "Quick Edit Mode", right click on the title bar, pull down to Properties and click on the Options tab. Then select QuickEdit Mode (if it isn't already). This will enable you to click-and-drag in the DOS window to highlight/copy text.

4 Command Completion

The NT command shell supports command completion, though it is not activated by default. To activate command completion you need to edit the registry (using, for example, regedit) and change the value of:

By default it is set to 0x0 (which disables command completion). To enable command completion, set the value to the ASCII code of the key you want to activate command completion. For example, to use Tab, set the value to 0x9.

5 Command History

To enable a command history (that can be accessed using the up and down arrow keys) just execute doskey at the command prompt. For example, to create a command history of 100 elements:
    doskey /listsize=100
    

Note that in old versions of MS-DOS, doskey was a "terminate and stay resident" program. This is no longer the case -- it is now part of the command shell.

6 Aliases

You can create aliases (Microsoft calls them "macros") using the doskey command. For example:
    doskey ls=dir
    

will create an alias ls that will execute the dir command.

The variable $* can be used in an alias to pass all of the arguments entered after the alias.

Copyright 2019