mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Add broadcast_change function from 2016.3 from #30800
This commit is contained in:
parent
73d73e80c1
commit
acc7a5f9ff
@ -131,6 +131,15 @@ def _key_exists(hive, key, use_32bit_registry=False):
|
||||
return False
|
||||
|
||||
|
||||
def broadcast_change():
|
||||
'''
|
||||
Refresh the windows environment.
|
||||
'''
|
||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/ms644952(v=vs.85).aspx
|
||||
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0,
|
||||
SMTO_ABORTIFHUNG, 5000)
|
||||
|
||||
|
||||
def read_value(hive, key, vname=None, use_32bit_registry=False):
|
||||
r'''
|
||||
Reads a registry value entry or the default value for a key.
|
||||
|
Loading…
Reference in New Issue
Block a user