I'm setting up a custom command line utility, and the 'installer' adds a PATH entry. It works after this for the current session. After I close and open the command prompt, the PATH is reset and the command line isn't available any more. What's this about and how do I permanently set it from CMD?
How do I permanently set the
PATH from a
You need to use
setx instead of
SetX PATH "c:\my dir;%PATH%"
"s are recommended in case any of the path elements contain spaces.
cmdshell should be run as Administrator.
/mto set the
PATHin the system environment instead of the user environment.
- See my answer Why does Windows have a limit on environment variables at all? for a discussion on how long the
PATHis allowed to be without errors.