Environment variables

Bruce Wheeler NOSPAMbruce_wheeler at hp.com.NOSPAM
Fri Dec 3 16:32:48 EST 1999


Kevin Cazabon wrote:
> 
> I ran into the same thing...  It's not too hard on NT, as you can set most
> of them through the registry using Mark Hammonds Win32 Extensions.  For
> Win98, I've been adding the changes to the autoexec.bat and forcing a
> reboot.
> 
> One thing I've found though:  changing things in the NT registry works, but
> the changes don't actually become effective immediately.  I'd recommend a
> reboot to be safe after setting up your changes.
> 
I've found just a logoff/logon works. However if you use the control
panel / system / environment to add a new variable, any new shell for
python will have the new variable. The environment variables are
permanently stored in either 

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session
Manager/Environment
for system variables.
HKEY_USERS/<user>/Environment for user variables.

I'm guessing, but if you also updated HKEY_CURRENT_USER\Environment it
might work the same as using the control panel. I need to solve the same
problem in the next week or 
so. I'll post the answer when I do.

Hope this helps

Bruce_Wheeler at hp.com




More information about the Python-list mailing list