If you have just scripted some changes to the current user's settings, such as REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /D "%SystemRoot%\MyWallPaper.bmp" /F, you can cause Windows to refresh the user settings by running the following commands:
@echo Set oShell = CreateObject("WScript.Shell")>"%TEMP%\UpdatePerUserSystemParameters.vbs" @echo oShell.Run "%SystemRoot%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True>>"%TEMP%\UpdatePerUserSystemParameters.vbs" cscript //nologo "%TEMP%\UpdatePerUserSystemParameters.vbs"
0 comments
Hide comments