how to change the original startup dir of cmd?

L

Laurince Yerh

in a newly installed win2k, the startup folder of cmd is C:\
(here C: is the drive where i install my win2k.)

after i make some tunes for my personal preference,
the startup folder of cmd changed to
"\Documents and Settings\Administrator\"

how can i restore it to c:\ ??
don't tell me to set registry
HKCU\ms\command processor\autorun to "cd \\"

after i took this way, all my bat programs that depend
on the path it's "Starts in" stop working

so what's right way?
 
D

Dave Patrick

On the shortcut's shortcut property tab set the "Start In:" directory to C:\


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]
 
M

Mark V

In said:
in a newly installed win2k, the startup folder of cmd is C:\
(here C: is the drive where i install my win2k.)

after i make some tunes for my personal preference,
the startup folder of cmd changed to
"\Documents and Settings\Administrator\"

how can i restore it to c:\ ??
don't tell me to set registry
HKCU\ms\command processor\autorun to "cd \\"

after i took this way, all my bat programs that depend
on the path it's "Starts in" stop working

Well the "Autorun" is effective and useful. Otherwise if a shortcut
set the "Start In" value.

Your batch problem is not specific to where the CMD.EXE session is
started (Current Drive/Directory), but rather to your batch files
themselves. It is poor practice to use relative paths in batch (or
any other language) and instead all Paths should be Fully Qualified
(FQP). This is crutial and basic and you should fix the batch files
as a separate issue. ...then use an AUTORUN= to fix the "open in"
for CMD.EXE. And the value I would use is "CD /D C:\"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top