Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am a developer and usually do stuff with the PATH variable. However, now there are too much path in it, and using a short textbox of Windows is a pain.

Before I happen to jump into a text file, that I think it is the file that saves Environment Variables, but now I can't remeber where it is, and Google gave me no possitive result too.

Can anyone tell me where that file is?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The Path is just another environment variable, and is stored in the registry along with all other environment variables. This StackOverflow answer identifies those registry keys.

The system environment variables are stored at:

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

The user environment variables are stored at:

HKEY_CURRENT_USER\Environment

The system environment variables apply to every user on the machine. At runtime, the user path for the currently logged in user (you can find other users in HKEY_USERS\) is added to the end of the system variable (so, the final path is equal to "%SystemPath%;%UserPath%"). Unless you specifically need every user to have the same environment variables, it is heavily recommended that you only modify the user-specific ones.

As pointed out in the comments, the path variable is special in this regard. Other user variables will override the system one.

share|improve this answer
    
AFAIK, it is only PATH that gets the special "append" behavior – other environment variables override the system ones. –  grawity Aug 24 '13 at 7:33
    
@grawity Hm. I forgot about that. Updated. Thanks. –  Bob Aug 24 '13 at 13:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.