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.

So many times, I would like to add a directory to the PATH in windows. And I think the GUI for it must be the must stupid GUI ever developed in windows, yet it's there since ages, in an unmodified form till in Windows 7.

My question is, that do you know any freeware tiny application which could let me do something like:

  • add current dir to path
  • edit path directories

To a context menu, for example? If you have a custom solution using Total Commander, it's equally as good, as thats where I spend most of my time...

share|improve this question

closed as off-topic by DragonLord, ncdownpat, fixer1234, DavidPostill, agtoever Mar 5 at 9:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – DragonLord, ncdownpat, fixer1234, DavidPostill, agtoever
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 1 down vote accepted

There may be more elegant solutions possible (this is a little kludgy), but off the top of my head:

  • Download this program and extract to c:\wherever

  • To automate things a bit, you could add a right-click context menu for folders that points to that program (these instructions are for XP):

    • Start, Run, Regedit (be careful, backup your machine first, etc. etc.)
    • Go to HKEY_LOCAL_MACHINE\Software\Classes\Folder\Shell
    • Right click on shell and choose "New Key"
    • Type PathMgr enter
    • Right click on PathMgr and choose "New Key"
    • Type command enter
    • Click on command
    • Double-click on (Default)
    • Type c:\wherever\pathmgr.exe enter
  • Then in the future you can either:

    • Right-click on a folder and choose PathMgr and edit away

Or, to add a folder:

  • Right-click on the folder you want to add and choose "Copy"
  • Right-click on the folder again, choose PathMgr
  • Click on the insert button to insert a new path
  • Right click on the new path entry you created and choose Modify, via Paste
  • Apply, Exit
share|improve this answer

I have adapted this answer from an out of date blog post where the links don't work, so I will provide all the instructions you need here.

Source: http://www.addictivetips.com/windows-tips/add-remove-any-folder-to-path-variable-using-context-menu/

WARNING: This procedure involves registry editing. If you are not comfortable editing the registry, turn back now. As you probably know, you can cause serious problems in the registry.

This procedure is written to work on Windows 7 or 8. I can't say how it will work outside of those versions.

  1. Download the GTools utility pack from here: http://p-nand-q.com/download/gtools/

    It's really just the "pathed.exe" tool you're looking for. For the purposes of this effort, you can remove everything else that's included in GToools.

  2. Install the GTools or just place the pathed.exe file somewhere convenient and permanent.

  3. Determine the path to the pathed.exe file. You will need it shortly.

  4. Add a key to the windows registry at the following path:

    "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\"

    Call it something that makes sense like "Add To Path"

  5. Add another key under that key, called "command".

  6. Within that key, set the default value similar to the following:

    "C:\Program Files (x86)\GTools\pathed.exe" /APPEND "%0" /USER

    Remember that it must be set with exactly this format. The quotes are very important.

    Where "C:\Program Files (x86)\GTools\" represents wherever you ended up putting the pathed.exe file.

  7. Add another key to the windows registry at the following path:

    "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\"

    Call it something that makes sense like "Remove From Path"

  8. Add another key under that key, called "command".

  9. Within that key, set the default value similar to the following:

    "C:\Program Files (x86)\GTools\pathed.exe" /REMOVE "%0" /USER

    Remember that it must be set with exactly this format. The quotes are very important.

    Where "C:\Program Files (x86)\GTools\" represents wherever you ended up putting the pathed.exe file.

  10. Restart windows or go into task manager and restart "Windows Explorer" (a.k.a. explorer.exe)

    This step is required to get Explorer to recognize the new context menu entries.

This places the chosen directory into the "User" path. Meaning it is specific to you. So, this will not affect other users.

It is important to note, that using this setup, it is easy to clutter up your user path, by placing directories in it multiple times. This doesn't have any real negative effect. It's just messy. This problem is easily resolved by using "Remove From Path" on any directory prior to using "Add To Path" on it. This would remove any prior entries of that directory and you would only end up with the one.

I think based on this, you can also figure out how to use pathed to place itself in the path, thereby allowing you to easily add directories to the path from the command line as well.

Should you ever wish to remove these context menu options, simply reverse the process.

share|improve this answer

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