Edit the PATH environment variable in Windows without pain

Editing the PATH environment variable in Windows is an unpleasant experience. First, it takes several steps to get to the interface. Second, the interface is impossible:

Something you can do to make the task easier is copy the whole field, edit it in a text editor and paste it back. But there are better ways.

Here I suggest four alternative tools for editing the PATH and other environment variables from a proper interface. Two are command-line tools and the other two have a graphical interface. All are available for free. I list them in order of personal preference.

pathed

I like pathed most because it is the simplest. It is a command-line tool, part of the GTools collection. Its usage is straightforward:

For example, say that you have your Sysinternal tools in C:\Bin\Sysinternals and you want to add them to the PATH. Simply do:

pathed /append C:\Bin\Sysinternals /machine

If you want to add them to the user PATH system instead, then do:

pathed /append C:\Bin\Sysinternals /user

If you want to know what’s in the PATH before you start editing, pathed does that equally well. Simply use pathed. Typing pathed without any arguments gives you a clean readable list of the machine PATH:

Rapid Environment Editor

For something that can do more than either pathed or PathEditor, you can try the Rapid Environment Editor, a feature-rich viewer and editor for all environnent variables:

I have not used or explored Rapid Environment Editor properly, because it is more than I need. So, I can’t say how good it is in practice. But it seems to be a carefully made application, and the fact that it has been translated in 13 languages, all by volunteers, suggests that it works well and that it is appreciated by lots of people.

Other

For Windows XP and Windows Server 2003, another alternative is pathman.exe, a command-line path manager included in the Windows Server 2003 Resource Kit Tools that lets you add and remove directories to and from the user PATH and the system PATH. While not as helpful as pathed, the other CLI tool in this list, pathman is certainly better than the default edit box.

Please note that Windows Vista, Windows Server 2008 and Windows 7 are not officially supported by the 2003 Resource Kit Tools. For these versions of Windows select one of the other three path editors.