How can I change the default startup directory for cmd.exe?
Posted
by Nano HE
on Stack Overflow
See other posts from Stack Overflow
or by Nano HE
Published on 2010-01-20T02:58:28Z
Indexed on
2010/06/14
11:22 UTC
Read the original article
Hit count: 178
Hi. My Procedure last day as below
Click Start, Run and type Regedit.exe Navigate to the following branch:
HKEY_CURRENT_USER \ Software \ Microsoft \ Command Processor
In the right-pane, double-click Autorun and set the startup folder path as its data, preceded by “CD /d “. If Autorun
value is missing, you need to create one, of type REG_EXPAND_SZ or REG_SZ in the above location.
Example: To set the startup directory to D:\learning\perl, set the Autorun value data to CD /d D:\learning\perl
Then I clicked Start, run and type cmd. It successfully. I could do perl practice more conveniently now.
But today, I find when I try to build my Visual Studio 2005 solution which included some Pre-build event Command like this:
perl.exe MyAppVersion.pl
perl.exe AttrScan.pl
It doesn't work. Show error: can't find the path.
I check the environment variable setting and find the variable-path
and it's value-c:\perl\bin\;
still exist.
Finially, I try to removed the Regedit.exe configuration "Autorun" value and test again. The issue fixed.
I only changed the default startup directory for cmd.exe command. Why the pre-build event perl command was impacted? (I am using winxp and activePerl 5.8)
© Stack Overflow or respective owner