1.

Solve : XP: Want to Change Default CMD prompt directory?

Answer»

I understand that to change the directory that one is placed into upon Start>Run>cmd (which currently puts me into c:\Documents and Settings\userid), I have to edit the registry. I am hesitant to do this. Isn't there some variable that can be set or some way a batch file can be set to automatically execute upon executing the cmd command? I know it seems LAZY, but I have to do this a lot and WOULD like this directory to be set to c:\ automatically (I have a .bat file that changes it after that, but doggone it why can't it start where I want it to? : )WELCOME to the CH forums.

Would you consider using a shortcut to open the Cmd.exe window? Using a shortcut you can do just about anything with the window which opens including color the screen, open in full screen, default to any path you wish etc... or you could set Hotkeys (Shortcut keys) to start Cmd as shown...

Attached a couple of screenshot examples. The Target on the FIRST one should show it starting with %comspec%

[attachment deleted by admin]You could create a batch file with the command and put it in your path. For example, use
Code: [Select]cmd /k cd /d C:\and save it as CMD2.bat in your C:\Windows directory, or anywhere in your path. Then you can do Start -> Run -> CMD2what about autoexec.nt?Quote from: BC_Programmer on February 26, 2009, 10:34:05 PM

what about autoexec.nt?

That's for 16 bit DOS applications & COMMAND.COM.
Quote from: Dias de verano on February 27, 2009, 12:22:23 AM
Quote from: BC_Programmer on February 26, 2009, 10:34:05 PM
what about autoexec.nt?

That's for 16 bit DOS applications & COMMAND.COM.


ok. haven't done a lot of batch stuff since 3.1 and 98, as you can probably tell


Discussion

No Comment Found