Thursday, January 28, 2010

Windows command prompt - cmd.exe

The situation:

I use the command prompt in Windows and was wanting to save my history. After searching the internet I never did find a way to save my history between sessions, but I came across some hints and tips that were useful. So I am posting any tips I already knew along with those I came across. Links to sites that I gathered info from are at the bottom of the post.

Here are the settings I change for the command prompt. What's nice is that the changes will be remembered once you have set them if you want them to. You get at these settings by right clicking on the title bar and choosing "Properties"
======================================
Options > Cursor Size > Small
Options > Command History > Buffer Size > 100
Options > Command History > Number of Buffers > 4
Options > Command History > Discard Old Duplicates > Checked
Options > Display Options > Window
Options > Edit Options > Quick Edit Mode > Checked
Options > Edit Options > Insert Mode
Font > Size > 8x12
Font > Font > Raster Fonts
Layout > Screen Buffer Size > Width > 128
Layout > Screen Buffer Size > Height > 512
Layout > Window Size > Width > 128
Layout > Window Size > Height > 64
Layout > Window Position > Let system position window > Checked
Colors > Screen Text > 255,255,255
Colors > Screen Background > 0,0,0
Colors > Popup Text > 0,0,255
Colors > Popup Background > 255,255,255

Hints and tips
============================================
  1. "Up Arrow" key will take you back through the command history
  2. "Down Arrow" key will take you forward in the command history
  3. The "Tab" key will auto-fill a directory or file name for you
  4. Put quotes around paths with spaces in them
  5. Left-click and drag to highlight text and then right-click to copy
  6. Right-click to paste copied text

Function keys
============================================
ESC - Clear the command line
F1 - Enters the last command one character at a time
F2 - PopUp "Enter char to copy up to:"
F3 - Re-types the last command in history
F4 - PopUp "Enter char to delete up to:"
F5 - Moves back in history one line at a time. (Remembers where it's been)
F6 - Types "^Z" to the command line
F7 - PopUp of command history in a numbered list
F8 - Moves back in history one line at a time. (Loops back to beginning)
F9 - PopUp "Enter command number:"
F10 -
F11 -
F12

IP addresses work, Domain names don't

Windows Error: IPs work, Domain names don't

res://C:\WINDOWS\SYSTEM\SHDOCLC.dll/dnserror.htm

Click "Start"
Click "Run"
Type into the run box "regsvr32.exe /i shdocvw.dll"

You should see a dialog box that says: "Registerserver and dllinstall in shdocvw succeeded".

Press OK then reboot the system.

About

Blogger templates