Startup directory of command prompt

J

jeffc

I installed some Windows updates and the starting directory is now my
documents folder when starting a command prompt. How can I change the start
directory to some new default when starting all command prompts? thanks
 
T

Torgeir Bakken \(MVP\)

jeffc said:
I installed some Windows updates and the starting directory is now my
documents folder when starting a command prompt. How can I change the start
directory to some new default when starting all command prompts? thanks
Hi

One of the security updates released last year is to blame (MS03-045/KB824141
I think). But you can change it back, from a previous post:


Message-ID: <[email protected]>
From: (e-mail address removed) ("Eric Shen [MSFT]")
Subject: RE: MS03-045 changing environment variables

<quote>

Hi Paul,

In order to customize the startup directory of Windows 2000, as you
noticed, we can use the HOMEPATH variable. You can change it to \ so
command prompt will start under C:\. (C is the partition you installed
Windows 2000 on). To do this, please try:

1. Open "System" from the Control Panel.

2. Click "Advanced"->"Environment Variables".

3. Under "User variables for <user>",
- if there is an entry for HOMEPATH, please change it to "/" (without
quotation marks).
- if there is no entry for HOMEPATH, please create a new one with "/"
(without quotation marks).

Then command prompt will start under C:\. Please let me know if this solves
this issue or if you need further assistance.

I look forward to hearing from you.

Regards,

Eric Shen
Product Support Services
Microsoft Corporation

</quote>
 
J

Jack Wang [MSFT]

Hi Jeff,

The method of Eric should work. Also, the information is stored in the
following registry key.

HKEY_CURRENT_USER\Environment

If you need further assistance, feel free to let me know.

Hope this helps!

Sincerely,
Jack Wang, MCSE 2000, MCSA, MCDBA, MCSD
Microsoft Partner Support

Get Secure! - www.microsoft.com/security

=====================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "jeffc" <[email protected]>
| Subject: Startup directory of command prompt
| Date: Thu, 29 Apr 2004 10:49:36 -0400
| Lines: 5
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.win2000.general
| NNTP-Posting-Host: bi01p1.nc.us.ibm.com 129.33.49.251
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
..phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.win2000.general:134481
| X-Tomcat-NG: microsoft.public.win2000.general
|
| I installed some Windows updates and the starting directory is now my
| documents folder when starting a command prompt. How can I change the
start
| directory to some new default when starting all command prompts? thanks
|
|
|
 
J

jeffc

Jack Wang said:
Hi Jeff,

The method of Eric should work. Also, the information is stored in the
following registry key.

HKEY_CURRENT_USER\Environment

If you need further assistance, feel free to let me know.

Hope this helps!


I tried this and it doesn't work. There is a key called Volatile
Environment and the value of HOMEPATH keeps getting reset to my documents
directory here. I have rebooted.
 
J

Jack Wang [MSFT]

Hi Jeff,

Thank you for the reply.

This issue may occur if the MS04-011 has been applied. After MS04-011 has
been applied, users are not allowed to create or change the values of these
environment variables. Moreover, when a domain account is used, the logon
process now doesn't get the values from the registry but from what has been
set in the domain account profile. As a result, what is shown by the
"System Properties / Environment variables" user interface (which still
reads the registry) doesn't necessarily reflect the current values of the
environment variables. The correct way to get their right values in this
case, is to use the "set" command of the command prompt.

Environment variables %HOMEDRIVE% and %HOMEPATH% normally get their values
from the drive and path defined in the "Home Folder" part of the profile of
a domain user account. However, before the security update MS04-011
(Q835732), a user was allowed to create these environment variables
manually and set their values via the "System properties / Environment
variables" user interface. He could also achieve it by editing the
registry, under HKey_Current_Users\Environment (the two ways are identical
since the "System Properties / Environment variables" user interface
manages the values from the registry). Since the logon process got the
values of the environment variables from the registry, the value of
%HOMEDRIVE% and %HOMEPATH% shown by the "set" command always matched what
was shown by the "System properties / Environment variables" user
interface.

For more information, please refer to the following article.

841343 After MS04-011, environment variables %HOMEDRIVE% and %HOMEPATH% may
http://support.microsoft.com/?id=841343

Hope this helps!

Sincerely,
Jack Wang, MCSE 2000, MCSA, MCDBA, MCSD
Microsoft Partner Support

Get Secure! - www.microsoft.com/security

=====================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "jeffc" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: Re: Startup directory of command prompt
| Date: Mon, 3 May 2004 11:11:03 -0400
| Lines: 20
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.win2000.general
| NNTP-Posting-Host: bi01p1.nc.us.ibm.com 129.33.49.251
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.win2000.general:135081
| X-Tomcat-NG: microsoft.public.win2000.general
|
|
| | > Hi Jeff,
| >
| > The method of Eric should work. Also, the information is stored in the
| > following registry key.
| >
| > HKEY_CURRENT_USER\Environment
| >
| > If you need further assistance, feel free to let me know.
| >
| > Hope this helps!
|
|
| I tried this and it doesn't work. There is a key called Volatile
| Environment and the value of HOMEPATH keeps getting reset to my documents
| directory here. I have rebooted.
|
|
|
 

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