#66549 - 2002-06-10 08:59 PM
accept registry changes immediately
|
Anonymous
Anonymous
Unregistered
|
Hello KiX Users,
I am using a script to make changes to the registry. For example screensaver settings or Explorer view changes. But those are not accepted until the user logs into the system again. I noticed that the SETx commands send a SW_SETTINGCHANGE to have the explorer re-read the settings. My question is if there is a way within KiX to let that happen.
Thanks for your help.
Fabian Koehlmann
|
|
Top
|
|
|
|
#66550 - 2002-06-10 09:12 PM
Re: accept registry changes immediately
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
What operating systems are you using? I'm thinking of a possible way to do this.. hmmm. If it's NT 4.0 or later, you should be able to use WMI to do this (theoretically) using the Win32_Desktop Class... nevermind.. the properties are read only.. logging off and back on works.. lemme think.. I'll come up with something..
Brian [ 10 June 2002, 21:17: Message edited by: BrianTX ]
|
|
Top
|
|
|
|
#66551 - 2002-06-10 09:39 PM
Re: accept registry changes immediately
|
Anonymous
Anonymous
Unregistered
|
I am using NT based systems. NT4, 2k, XP Pro.
Thx for fast response...
|
|
Top
|
|
|
|
#66553 - 2002-06-10 11:42 PM
Re: accept registry changes immediately
|
Anonymous
Anonymous
Unregistered
|
if you kill explorer.exe sleep 3 seconds and run explorer.exe again maybe it works (explorer is the default shell) ps. absolute untested !
|
|
Top
|
|
|
|
#66554 - 2002-06-11 08:14 AM
Re: accept registry changes immediately
|
Aaron.Power
Lurker
Registered: 2002-06-11
Posts: 1
|
When working interactively in Windows, the way to have these changes picked up immediately after you change the registry values by hand is to click somewhere on the desktop (so that it has the focus) and then press the F5 key (Refresh).
Not sure that this helps in a scripting situation. You have the SetFocus command and the SendKeys command, but I am not sure how you would get it to set the focus to the desktop, as the desktop does not usually live in the "Window List".
Still it is a lot less drastic than killing the root Explorer process and then re-loading it.
|
|
Top
|
|
|
|
#66555 - 2002-06-11 09:12 AM
Re: accept registry changes immediately
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11629
Loc: CA
|
Re-Initialize Your Registry Without Rebooting http://www.winguides.com/registry/display.php/239/
Restart Windows Without Rebooting To restart Windows without restarting your computer, choose Shut Down from the Start menu and hold down the Shift key while pressing OK in the Shut Down box until "Now Restarting Windows" appears on the screen. Then release the Shift key
|
|
Top
|
|
|
|
#66556 - 2002-06-12 12:57 AM
Re: accept registry changes immediately
|
Anonymous
Anonymous
Unregistered
|
Fabian Koehlmann Hello,
some apps can be reloading their registry setting by restarting the service that they are running under.
Mike
|
|
Top
|
|
|
|
#66557 - 2002-06-11 10:42 PM
Re: accept registry changes immediately
|
Anonymous
Anonymous
Unregistered
|
Thanks, for all your hints so far. But neither of it works nor is acceptable to put into a login script except the policy one.
Does anyone of you know what command is executed after you changed settings within the windows explorer? Guess on english system it should be Tools/Folder Options (2k). When you press ok there? I think this is the routine I am looking for. Can i be run by rundll.exe?!
Or using a dummy SETx command to have it re-read. Hopefully it reads most of the settings which were changed.
Regards, Fabian. [ 11 June 2002, 22:45: Message edited by: Fabian Koehlmann ]
|
|
Top
|
|
|
|
#66560 - 2002-06-12 05:40 PM
Re: accept registry changes immediately
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I think you're right, Jens... There is something else you can do if you don't want users messing with your settings:
Under "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" Set the "NoSaveSettings" REG_DWORD to 1
That way everything goes back to normal after they log off (which will annoy a lot of people if they are used to having lots of control about their desktop!)
Brian [ 12 June 2002, 17:50: Message edited by: BrianTX ]
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 641 anonymous users online.
|
|
|