6
4
I know I can change the settings for the screensaver in Windows XP from the command line by updating the registry as follows:
regedit.exe /s settings.reg
Where settings.reg contains:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"ScreenSaveTimeOut"="7200"
"SCRNSAVE.EXE"="C:\\WINDOWS\\system32\\scrnsave.scr"
However, the settings do not take effect until I log out and back in. If I change the settings via Display Properties they take effect immediately.
Yes, it is Windows XP. Yes, there's a reason for it.
I know about SetScrTimeout.exe so I know it can be done. I can't use that tool on my system though and would prefer something homegrown.
How can I make these changes take effect immediately when changing the registry from the command line?
“That would be rather inefficient” — unless MSW defined an API to subscribe to changes in the registry! I also note that
SystemParameterInfo
does not include a selector to specify the screen saver to be used. Could you perhaps add a link to documentation of the use of the DLL with rundll32? – PJTraill – 2016-11-08T15:35:49.360