I\'ve been having difficulty with getting my users to set the PATH environment variable manually, I\'m looking for a way to do this automatically. A batch file would be prefera
I just ran across this question and didn't like any of the available options so I decided to write my own solution.
(SetEnv would've been good, but I didn't like the non-libre license and I always prefer not having to call a subprocess... I wouldn't mind calling SetEnv as a subprocess but, according to Wikipedia, the license it uses is non-libre because it has some kind of "do no evil" clause and that kind of legally-ambiguous restriction is always a ticking time-bomb in my opinion.)
Here's a little MIT-licensed Python class to hide away the work of modifying the registry directly and sending the WM_SETTINGCHANGE. (Good for use in setup.py
)