Old 20th January 2003, 18:03   #1
Darker
Junior Member
 
Join Date: Jan 2003
Posts: 3
Unhappy 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"

Works fine in 2k, takes effect immediately.

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.

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?

Thanks!
Darker is offline   Reply With Quote
Old 20th January 2003, 19:31   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 21st January 2003, 15:11   #3
Darker
Junior Member
 
Join Date: Jan 2003
Posts: 3
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.
Darker is offline   Reply With Quote
Old 21st January 2003, 18:15   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 22nd January 2003, 15:16   #5
Darker
Junior Member
 
Join Date: Jan 2003
Posts: 3
bah, I erased the line when I couldn't get it working and gave up.
Thanks for the help though.
Darker is offline   Reply With Quote
Old 26th March 2004, 07:12   #6
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
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
Yathosho is offline   Reply With Quote
Old 26th March 2004, 08:51   #7
gieltje
Junior Member
 
Join Date: Feb 2003
Posts: 25
I would also be very interested, my installer makes a **** load of such registry changes
gieltje is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump