[python-win32] gpedit reload method in python
Tim Golden
mail at timgolden.me.uk
Thu Apr 30 21:04:40 CEST 2009
le dahut wrote:
> Hello,
>
> "gpedit.msc" can change several parameters in system for example items
> in start menu or hidden drives in explorer. The changes made in "gpedit"
> are immediately applied, if you have "My computer" opened you can see
> selected letters disappear.
> I know that "gpedit" modifies
> HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives.
> But I don't know how "gpedit" updates the system, what sort of system
> call is done.
>
> I've already tried :
> win32gui.SendMessage(win32con.HWND_BROADCAST,
> win32con.WM_SETTINGCHANGE, 0, 'Environment')
> and the commande :
> RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True
> without success.
>
> Does someone know more about this ?
> Are there other API calls that update the system ?
You might need to call SHChangeNotify
http://msdn.microsoft.com/en-us/library/bb762118(VS.85).aspx
TJG
More information about the python-win32
mailing list