G
Guest
The following script changes a registry setting. The changes do not take
effect until a logoff/logon occurs. How do I post the changes to windows so
it becomes effective immediately?
Regards
Col
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\" & strComputer &
"\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
objReg.CreateKey HKEY_CURRENT_USER, strKeyPath
ValueName = "Start_ShowControlPanel"
dwValue = 2
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue
msgbox "Done"
effect until a logoff/logon occurs. How do I post the changes to windows so
it becomes effective immediately?
Regards
Col
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\" & strComputer &
"\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
objReg.CreateKey HKEY_CURRENT_USER, strKeyPath
ValueName = "Start_ShowControlPanel"
dwValue = 2
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue
msgbox "Done"