Re: DOS shell start at U:\ instead of C:\
wong_powah@yahoo.ca wrote:
> On Jan 17, 6:09 am, "David Webb" <dwebb...@earthling.net> wrote:
>
>>Ignore my previous post. I misread your request.
>>
>>It appears that you want to start in C:\win44. In order to ensure consistent
>>results do not use environmental variables, which may be only temporary.
>>
>>Enter C:\win44 in the "Start in" field of the shortcut.
>>
>>"David Webb" <dwebb...@earthling.net> wrote in message
>>
>>>Since you set HOMEPATH to win44, it's doing exactly what you're asking for.
>>
>>>Why don't you simply change the "start in" value to C:\ and forget about using
>>>any variable?
>>
>>><wong_po...@yahoo.ca> wrote in message
>>>news:359c31d5-34af-4265-8ce7-beb9f3358fa1@k2g2000hse.googlegroups.com...
>>>
>>>>On Jan 16, 3:47 pm, "David Webb" <dwebb...@earthling.net> wrote:
>>>>
>>>>>Right click on the Command Prompt shortcut and select Properties. In the
>>>>>Shortcut tab, you can change/select where you want it to start in.
>>
>>>>>You can use environmental variables or actual drive and directory names.
>>
>>One
>>
>>>of
>>>
>>>>>mine is set as C:\ and another is %HOMEDRIVE%%HOMEPATH%
>>
>>>>><wong_po...@yahoo.ca> wrote in message
>>
>>>>>news:7cb12c51-96a2-47ee-acf8-c9970468139c@e10g2000prf.googlegroups.com...
>>
>>>>>>The windows 2000 DOS shell start at U:\ instead of C:\.
>>>>>>How to make it start at C:\?
>>>>>>I had set environment variables as follows but they do not work:
>>>>>>HOMEDRIVE=C:
>>>>>>HOMEPATH=C:
>>>>>>and also
>>>>>>HOMEDRIVE=C:\
>>>>>>HOMEPATH=C:\
>>
>>>>I change %HOMEDRIVE%%HOMEPATH% to C:\%HOMEPATH%.
>>>>I set HOMEPATH=win44
>>>>The Windows command prompt start at "C:\" instead of "C:\win44".
>>>>How to fix this problem?
>
>
> Previously I can set Windows command shell to start C:\win44 by
> setting the environment variables "HOMEDRIVE=C:\" and "HOMEPATH=win44"
> on windows NT.
> I do not know why the same procedure does not work on windows 2000.
I don't think that you should be trying to change the %homepath%
variable, that may cause problems with other applications, some software
installation packages still use that variable when they are installed.
Instead do as the others have suggested and set the path in your
shortcut properties.
Another thing that you can do is set an "AutoRun" string in the Registry
to change to the desired directory.
When the Command Processor is launched it looks at:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor for instructions,
if it sees an AutoRun value there it will automatically run the string.
If it finds no AutoRun value there it will look for an AutoRun string
in the corresponding HKLM location.
At HKEY_CURRENT_USER\Software\Microsoft\Command Processor if you add the
following:
Value Name: AutoRun
Data Type: REG_SZ
and set the value data to: cd c:\win44
when you launch cmd.exe it will automatically run the command and change
the current directory to C:\win44
If you want to run the Command Processor without executing the AutoRun
commands you can add the /D switch when you start it, CMD /D.
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/91518.mspx?mfr=true
John