Changing the default command prompt directory

Cmd Prmpt

When command prompt is started up in Windows, it defaults to the directory X:\Documents and Settings\Username.

This directory can be changed by creating a new registry entry which will contain commands which is automatically executed when command prompt starts. This can be compared to the “autoexec.bat” file which existed in old DOS and Windows systems.

In the Registry editor(Start> Run> regedit), navigate to “HKEY_CURRENT_USER\Software\Microsoft\Command Processor”. Click on Edit> New> Expandable String Value. Type in Autorun as the name and press Enter. Check that the value type is ‘REG_EXPAND_SZ’. Double-click on “Autrun”, and enter in the value data cd c:\desired_folder\. This command will be executed every time command prompt starts, and you will start right in your desired folder.

Leave a comment

Leave a Reply