Search this blog

Thursday, September 25, 2008

Changing the default command prompt path

You can open a command window from the Run menu (or other applications like Launchy) using cmd, but it may not start from the directory you would like it to. It is easy to change this location.

Setting the default command prompt directory can be done with a simple registry hack. (Standard Disclaimer: change your registry at your own risk. Always backup your registry before making any change.)

In the registry editor, navigate to the following location:

HKEY_CURRENT_USER \ Software \ Microsoft \ Command Processor

If there is not an Autorun string value, create it. Then, set it's value to the directory you would like it to default to in this way:

CD /d c:\

Where c:\ is the path I've chosen as the default.

Also, one of the best power toys available from Microsoft is Open Command Window Here, which adds a context menu (right click) to folders in Windows Explorer, saving you the trouble of navigating to a folder in the command prompt.

No comments: