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.

after restarting my machine The path variable has been reset. In what scenarios the path variable is reset?

share|improve this question

migrated from stackoverflow.com Apr 25 '11 at 11:11

This question came from our site for professional and enthusiast programmers.

2 Answers 2

A quick and easy way to permanently edit the PATH in windows from the command line:

C:\WINDOWS>setx PATH "PATH;C:\some_new_path"

This will update the PATH by appending the new path to the existing path value. Typing the following command will print the new PATH in all future CMD windows; NOT in the current CMD window:

C:\WINDOWS>PATH

Typing the following will give you a list of all the environment variables:

C:\WINDOWS>set
share|improve this answer

It depends on how you set it.

If you run set PATH=... in Command Prompt, the environment variable is modified only for the cmd.exe process (and for all programs you run from the same Command Prompt window). Other processes are not affected.

To make your changes permanent, go to System Properties → Advanced → Environment Variables and under User variables click New.

share|improve this answer

Your Answer

 
discard

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