N S

Novick Software Management • Design • Programming • Training • Consulting

   

 

 

Tips and Tricks for:  Windows Programming

The opportunity: The Windows command prompt doesn't have autocomplete feature.  

The windows command prompt is rather dull.  It would benefit from an command completion feature that is commonly found in other operating systems.  I've also added a change in color.


Solution: The capabilities are there, they must be turned by via a couple of registry entries.

Windows NT has extended capabilities built in to the command prompt.  Uncharacteristically, Microsoft has chosen to turn them off by default.  Actually, the command completion appears to be on in Windows XP, but off in versions of Windows 2000 and Windows NT.

The two features that I use are the command completion feature and the ability to choose the color of the screen.  Command completion finishes the name of a program or file from the names in the current directory.  I always set the completion character to TAB because that's one character that shouldn't be in file names.

To change your registry, copy the following lines into a file with type .reg and execute it at the command line by typing it's name.  In Windows Explorer, you can just click on the file.  Alternatively you can down load the file in a zipped for from this link.  I've put the file in a zip so that any filters that prevent the transmission of .reg files won't prevent you from downloading it. 

Here's the reg file contents:

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"EnableExtensions"=dword:00000001
"DefaultColor"=dword:0000000a
"CompletionChar"=dword:00000009

I've chosen bright green letters with a black background.   For those of you two young to recognize these colors, the were the colors from the IBM 3270 block mode terminal and for many other terminals in the 1970's and 1980's.  They were probably chosen because they're pretty easy to read and the phosphors could be obtained cheaply.  Here's what it looks like:

 

The number of the color isn't an RGB value, it's one of the control code colors left over from DOS.  I don't have my original PC DOS manuals from 1981 so if you want another color, you'll have to play around with it.


RSS as HTML

Personal Blog

 
New Tips:

Loading SQL Profiler trace (.trc) files with fn_trace_gettrace

Upcoming
Presentations:

Big Data:
Working with Terabytes
in SQL Server

July 9 '08


Full Schedule