0

Is there a way to permanently modify your PATH from the command line?

I find myself often trying to run a command or two on the DOS prompt, and find out it's not on my path. I manually find the location, use the tool with a long winded path, and forget to add it to my path so I don't have to do that rigmarole again.

Ideally I'd love to say addToMyPath.exe [dir] and it would auto add to my regkey for the path. Anything like that exist?

Dave M
  • 13,250
Eddie Parker
  • 3,054

1 Answers1

2

Source How to update PATH variable permanently from cmd? by panny:

Use

setx PATH "%PATH%;C:\Something\bin"

The new PATH will not apply to your current cmd.exe.

If you look in the registry or in a new cmd.exe with set path you will see the new value.

See SETX.exe (Resource Kit, Windows 7) for more information on the setx command.

DavidPostill
  • 162,382