Darker
20th January 2003 19:03 UTC
win98 registry changes ignored until reboot?
;) Background:
Part of an installer I'm creating that runs via a login script installs a screen saver.
Win2k and Win98 both use the same key to specify the 'wait' period before the screen saver kicks in. Here's the command I'm using to set it.
WriteRegStr HKCU "Control Panel\Desktop" "ScreenSaveTimeOut" "240"
:up: Works fine in 2k, takes effect immediately.
:cry: Problem:
In win98, this registry setting doesn't take effect until the user logs out and back in.
i.e. If you change it to 4 minutes from 10 minutes via the above script command, then open the Desktop properties, the screen saver 'wait' period is still 10 minutes. At the next login, win98 picks up the new setting from the registry and all is well.
:hang: I don't want users to have to re-log to get this set.
Anybody know of a way to force some kind of scriptable 'refresh' that will whip win98 into compliance? Maybe? :D
Thanks!
kichik
20th January 2003 20:31 UTC
Try:
!include WinMessages.nsh
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Control Panel\Desktop" /TIMEOUT=5000
or:
!include WinMessages.nsh
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 0 /TIMEOUT=5000
If either of these doesn't work you'll have to search MSDN.
Darker
21st January 2003 16:11 UTC
Well, good try, but that doesn't seem to work.
I played with it for 3 or 4 hours (maybe I'm an idiot :)) and had no luck with either method above, or using the System.nsh sysSystemParametersInfo function which according to MSDN, should also set this.
I think I'll just accept defeat. Windows 98 sucks.
kichik
21st January 2003 19:15 UTC
It does, but when done right you can make it happen. The screen saver control panel does it, so it is possible. What's the System.dll line you tried?
Darker
22nd January 2003 16:16 UTC
bah, I erased the line when I couldn't get it working and gave up.
Thanks for the help though.
Yathosho
26th March 2004 08:12 UTC
sorry for bringing up this old post again, but i was wondering if somebody came across a solution in meanwhile.
my installer changes a couple of appearance settings (font smoothing etc), but that also doesn't work until i reboot.
to make this off-topic, i don't have win98 :p
gieltje
26th March 2004 09:51 UTC
I would also be very interested, my installer makes a **** load of such registry changes