In general whenever you start DOS Command Prompt (C:\WINDOWS\system32\cmd.exe) through Start–> Run–> cmd a window will open with default root directory. By defaults it will show the user profile home directory.
Here my default cmd startup directory is C:\Documents and Settings\rnl>, Now I want to change the root directory to E:\java practice> permanently.
If you want to change the default startup directory for Command Prompt, use the following steps.
- Go to Startà Run and type Regedit
- Registry Editor Window will appear.
- Then Navigate to My Computer\ HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Command Processor
- In the right-pane, double-click on AutoRun and set the value data as CD /d E:\java practice.
Now you will get the following cmd prompt permanently whenever you open command prompt.
How to change the drive of cmd prompt permanently?
How to set our own directory in Command Prompt?
How to change directory in command prompt?
How to change root directory of command prompt?
Changing cmd prompt directory permanently?
How to change the default startup directory for Command Prompt?
How to change directory in command prompt in windows?