You are here

%path% not working right

4 posts / 0 new
Last post
Bahamut
Bahamut's picture
Offline
Last seen: 12 years 7 months ago
Joined: 2006-04-07 08:44
%path% not working right

I can't seem to set %path% beyond the current cmd session anymore. I can use set to set %path%, but it doesn't stay. Changes made via System Properties -> Advanced -> Environment Variables seem to have no effect. I have a bunch of directories in there I set before via System Properties, but now I can't get rid of them or add new ones.

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 3 weeks 4 days ago
Joined: 2006-11-18 10:26
Maybe there's a 255

Maybe there's a 255 character limit. *shrugs*

Also check:

HKEY_CURRENT_USER\Environment\PATH

and

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path

Answer on thew charater limit is "it depends on your OS"...either 2047 or 8191 characters.

http://support.microsoft.com/kb/830473

http://msmvps.com/blogs/erikr/archive/2007/09/17/maximum-length-of-envir...

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

Bahamut
Bahamut's picture
Offline
Last seen: 12 years 7 months ago
Joined: 2006-04-07 08:44
It seems to have (kind of)

It seems to have (kind of) fixed itself. After a few reboots, it is set correctly. However, there is still the problem of it not changing without a reboot.

The character limit had nothing to do with it (what I wanted it to be is actually much shorter than what it was). Thanks for the keys, though.

Vintage!

rab040ma
Offline
Last seen: 3 weeks 21 hours ago
Joined: 2007-08-27 13:35
I just noticed the same thing.

I changed an environment variable via System Properties -> Advanced -> Environment Variables.

I noticed that some of the CMD sessions I started after that had the new variable, and some didn't.

It looks like the ones that don't have it were started from an application that has been running for a while (before I changed the variable), while the ones that did have the new setting were started from the start menu | Run. So I'm guessing that Explorer gives you the fresh variables, while the other program I was using to start CMD was using the environment it inherited when it was first started. Which makes sense when I think about it. Just a bit confusing the first time I saw it.

I do expect the new environment variables to show up after a reboot.

MC

Log in or register to post comments