change default location of command prompt
Can anyone tell me a workaround to change the default startup directory for command prompt in Windows 7? I normally perform this thing to start command prompt from C drive - press Windows + R key and then cmd /K cd C:\. I am looking for a way to perform some other things to start command prompt from C drive like this - press Windows + R keys and then cmd? Does anyone have any clue on how to do this? Thanks for any information in advance.
Re: change default location of command prompt
What you can do is try to create a copy of the cmd.exe, somewhere on your desktop for example, and then reight click on the same cmd.exe file and choose Properties. After that go to the Shortcut menu and then change the Start in: directory to something else. This way you will be able to change the default directory of command prompt in Windows 7. Another way to do this is via Registry but it is a bit difficult.
Re: change default location of command prompt
The registry method is quite simple for me. Just open Regedit and go to this path - HKEY_CURRENT_USER\Software\Microsoft\Command Processor. After that you need to create a new string value named Autorun and set its value to cd /d C:\. Now run cmd.exe and you are good to go on. Another method is go to command prompt shortcut in start menu - C:\Users\ your username \AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Command Prompt and rigth click on shortcut file to open the properties dialog. Now, you will see a textbox %HOMEDRIVE%%HOMEPATH% inside the Start in:. So if you are looking to start the prompt in C:\ then simply replace the variables with C:\.
Re: change default location of command prompt
All you need to do is go to Start Menu and then right click on Command Prompt and then click on Properties. After that the command prompt properties dialog box opens. You will need to edit a field called "Start in:" to a different location where you are looking to start the command prompt. So, the next time whenever you will start the command prompt then the start up directory will be something else that you have edited.