Using HOMEPATH to set default directory of command processor

J

John Wirt

I would like to set the default directory of the Windows command processor,
cmd.exe, to c:\. Currently, the command processor opens in c:\Documents and
Settings\user.name, when I run it from Start | Run | cmd.

It looks to me like the default directory is determined by a system level
environment string called, HOMEPATH. (or HOMEDRIVE and HOMEPATH). On my
computers HOMEPATH=\Documents and Settings\user.name.

I have tried to change the value of HOMEPATH to \ using the environment
editor in Control Panel | System | Advanced | Environment Variables but
whatever I try set HOMEPATH to, it reverts to \Documents and
Settings\user.name.

Does anyone know how to change the value of the HOMEPATH environment string?

I'm assuming this will change the default directory of the command
processor.

John Wirt
 
J

John Wirt

Hmm, I think the answer may be, go to HKCU\VolatileEnvironment]HOMEPATH in
the registry.

Is this where Windows gets the default directory in starting the command
processor?

John
 

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