Possible Duplicate:
How do I set PATH and other environment variables?

How can one set the path permanently in command-prompt. I tried using the following code :-

set path=%path%;C:\python27

It works but only until the command prompt runs. When I exit and restart, the path returns to its earlier state.

Please tell me how can I set the command path permanently in Windows 7 command prompt.

link|improve this question

The answers below are correct. What you did did not make the variable persistent. – KCotreau Aug 1 '11 at 12:46
@slhck: In general: Yes, you are right. However the other question was about all majors OS and thus the answer is really long. What this user was seeking is in one sentence in the last 1/3 of the answer and titled Windows NT. I'm not sure if a normal user knows that Windows 7 = NT 6.1. – TeX HeX Aug 1 '11 at 12:56
@TeX Actually it's in the first answer, in the part where it says Windows - GUI or Command Line. – slhck Aug 1 '11 at 13:00
@slhck:Woops, overlooked that. You are right. +1. – TeX HeX Aug 1 '11 at 13:03
feedback

closed as exact duplicate by slhck, techie007, random Aug 1 '11 at 14:19

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

2 Answers

up vote 4 down vote accepted

From the Start Menu, right-click Computer on the right side. In the appearing window, select Advanced system settings in the left area - the System properties will appear. Select Environment Variables... at the bottom.

Change the Path variable there and it will be always active.

link|improve this answer
feedback

You need to do the following:

  1. Go to Control Panel --> System and Security --> System
  2. Click Advanced system settings
  3. Click Environment Variables
  4. In the System Variables area, locate the Path variable, highlight it and click Edit...
  5. Make the required changes, Click OK, OK, OK

That will save your changes permanently.

link|improve this answer
feedback

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