1. This applies to Windows 7 (and I think to Vista as well):
- Start > Right-click on Computer > Properties.
- Advanced System Settings link (on left).
- Environment Variables button.
- You will find a Path variable under the System variables section.
- Select it and click Edit button to edit it.
- You may also find a Path variable under the User variables section. You can edit it also.
- When done, click OK three times.
Tip: The Edit variable window is not very user-friendly. Copy the contents to Notepad for easier editing, and then copy the edited version back.

2. Some systems may contain a PATH variable in the Volatile Environment. This variable is normally created on a computer connected to domains and usually cleared off at log out. However, you may want to check whether a PATH variable persists in the Volatile Environment:
- Start > type in
regedit.
- Run the
regedit.exe program that is found in the search.
- Navigate to
HKEY_CURRENT_USER\Volative Environment in Registry Editor's left pane.
- If there is any entry with the name
PATH on the right pane, ensure that the stored paths are not necessary^, then right-click the entry and click Delete.
- Click Yes to the message.
- Restart your computer for changes to take effect.
^ If any of the stored paths is necessary:
- Copy it to a
Path entry in HKEY_CURRENT_USER\Environment.
- You will have to copy the text manually. There is no drag-and-drop copying in Registry Editor.
- Double-click on the original entry to open the Edit String dialog, and then copy the necessary text.
- If there is no
Path entry in HKEY_CURRENT_USER\Environment:
- Right-click an empty space in right page and choosing New > String Value.
- Type the name
Path.
- Press Enter twice to save the name and open the Edit String dialog.
- Paste in the copied text.
- Click OK.
Source on Volatile Environment (See Using Volatile Environment PATH towards the end.)
setxcommand to reset the Path variable to something other than its current value (you won't see the change in the same command window, so open a new one after issuingsetxcommand). – ADTC Feb 24 '12 at 14:55setxmethod like that :setx path TEST(Took ~10 seconds)echo %path%gives;TEST;;u:\tools\bin;r:\tools;. No luck.setx path TEST /M(Do it in an Administrator command window.) The /M will change the Path in the System variables section (bottom part in the dialog). Without the /M, the Path variable is changed (or added) in the User variables section (top part in the dialog). Also if this doesn't work, try editing the variables in the Environment variables dialog itself. (PS: The path shown in command window when you doecho %path%is a concatenation of both system and user Path variables.) – ADTC Feb 24 '12 at 17:09setx. I usedsetenv.exewhich knows how to do that. – slaphappy Feb 27 '12 at 14:06HKCU\Volatile Environment. I'll add it to my answer here, but I can't update the duplicate question's answer coz, well it's so damn long I can't even begin to tell where I must include this info! (You could help me with that. And you can suggest edits even if you can't edit. Your suggested edit will be placed in a queue and they get approved very fast.) – ADTC Feb 27 '12 at 15:31