Windows Vista forgets my PATH environment variable on reboot

J

Jon Davis

Every time I reboot, the %PATH% environment variable is either not set or is
truncated (not sure yet, I keep fixing it before I check). If I open up the
System control panel, choose Advanced tab, and click the Environment
Variables button, and then just hit OK, the variables will re-apply
themselves, and my shell scripts will function correctly. On the next
reboot, though, it's all messed up again.

Anyone else have this problem and know how to overcome?

Jon
 
S

Synapse Syndrome

Jon Davis said:
Every time I reboot, the %PATH% environment variable is either not set or
is truncated (not sure yet, I keep fixing it before I check). If I open up
the System control panel, choose Advanced tab, and click the Environment
Variables button, and then just hit OK, the variables will re-apply
themselves, and my shell scripts will function correctly. On the next
reboot, though, it's all messed up again.

Anyone else have this problem and know how to overcome?

I don't know why that is happening, but you could always make the path using
a user login script.

ss.
 
J

Jon Davis

Synapse Syndrome said:
I don't know why that is happening, but you could always make the path
using a user login script.

ss.

Yeah, as far as workarounds go I suppose I am content with opening and
closing the control panel. I am just hoping to find the root of the problem
so that I don't have to, and so that I can be able to troubleshoot the
problem on other machines in the future without resorting to automating the
application of a band-aid to cover a wound that won't stop bleeding. Thanks
for the idea.

Jon
 
M

Michael Solomon

Jon Davis said:
Yeah, as far as workarounds go I suppose I am content with opening and
closing the control panel. I am just hoping to find the root of the
problem so that I don't have to, and so that I can be able to troubleshoot
the problem on other machines in the future without resorting to
automating the application of a band-aid to cover a wound that won't stop
bleeding. Thanks for the idea.

Jon
Are you using any disk or registry cleanup utilities as either of those
might be the source of the issue.
 
J

Jon Davis

Michael Solomon said:
Could one of your shell scripts be the issue?

Not sure what you mean; I have no login scripts, and it was the shell
scripts that were failing, specifically because a needed EXE file was
missing from the %PATH%.

Jon
 
M

Michael Solomon

Jon Davis said:
Not sure what you mean; I have no login scripts, and it was the shell
scripts that were failing, specifically because a needed EXE file was
missing from the %PATH%.

Jon
I see, okay, it was just a shot in the dark.
 
R

Robert Firth

Could write a very short c++ program and place it in the startup folder to
do that for you. Kinda a dinky work around, but that is what I would do.

int main(){
system("PATH=%path%;c:\program\path");
return 0;
}

Robert Firth
http://www.winvistainfo.org
 
C

Clayton Arends

I know it has been a while since your initial post on this topic. My
hope is that you are still monitoring this thread. I have the same
problem with my system. Vista keeps forgetting my path or at least
certain parts of the path. I have been having the problem for the
last three days but only today realized that my path was to blame. In
my case Vista will sometimes forget the path when it's woken up from
sleep and not just on reboots.

If you have solved your problem I would love to know the answer. In
case you haven't solved it I have included my configuration to see if
we may have some similarities.

I am a program developer. In my case I have some other system
variables set up and use those system variables in the path. For
instance:

SRC = C:\MyCompany\Source

This would be the base path to my source files. Beneath the base
source directory I have some common DLLs that I use during
development. So, the PATH variable contains in it entries such as
this:

%SRC%\DLLs
%SRC%\Scripts
... etc ...

The odd thing is that if I drop to the Command Prompt and echo %PATH%
all of the entries are there. But attempting to run a script I get
the "is not recognized as an internal or external command" message.

Vista hasn't forgotten my environment variables because I can run a
script file by typing the following:

%SRC%\Scripts\scriptname

The next time Vista forgets my path I will check and see if it has
only forgotten certain entries in the path or if the entire path is
shot.

- Clayton
 

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