[python-win32] modify environment variable

Mark Hammond mhammond at skippinet.com.au
Tue Dec 11 00:30:03 CET 2007


> A python program launched at user logon rewrites some registry keys
> such
> as "HKCU\Software\Microsoft\Windows\Current Version\Explorer\User Shell
> Folders\AppData" but explorer keeps using the old value.
> 
> How can I make windows reload the registry since the users have a
> mandatory profile and the value can be different depending on the
> machine they are connecting to or the group they are member of ?

Broadcasting a WM_SETTINGCHANGE message to all Windows might do what you
want, and cause explorer to reload its env variables.  Other processes
already executing which don't look for this message will not be changed
though...

Cheers,

Mark



More information about the python-win32 mailing list