change windows system path from cygwin python?

Jeff Lindholm jeff_news at lindholm.org
Wed Dec 15 13:43:35 EST 2004


>
> I want to write some kind of install script for my python app that
> will add c:\cygwin\usr\bin to the system path.  I don't want
> to walk around to 50 PC's and twiddle through the GUI to:
>
> My Computer --> Control Panel --> System --> Advanced --> Environment
>
>
> How can a python, or even a .bat script modify the system PATH?
> It doesn't appear to be in the registry.
>
It is in the registry
All users = local machine - "System\CurrentControlSet\Control\Session 
Manager\Environment"
Current User = Current User - Environment

The only issue with this is you will have to reboot for it take effect.





More information about the Python-list mailing list