Page 1 of 1 1
Topic Options
#100814 - 2003-05-08 03:51 PM Applying Registry Settings
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
For months now I have been trying to figure out a way to "Apply" changes to the registry. For example if you update the registry settings for the screen saver, the settings do not take effect until you restart/logoff.

I happened to be reading through the manual and saw the following...

quote:


SetM

Action: On the Windows NT-family (NT//2000/XP), sets variables in the environment of the local computer (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment).
On Windows 9x, sets variables in the global Windows environment (similar to the functionality offered by WINSET.EXE).


Syntax: SETM "variable=string"

Remarks: After any change to the environment, KiXtart informs running programs that the change was made, prompting them to regenerate their environments. Programs that support this feature (such as Program Manager, Task Manager, and Windows Explorer) update their environments when they receive the WM_SETTINGCHANGE message. The environment of the current process (KiXtart 2001) is not affected.



The area in bold above got me to thinking...

After making the changes to the registry, I simply added the following line:

setm 'ss='

and whola... Screensaver settings "Applied".

Hope this helps someone else down the road.

[ 08. May 2003, 16:03: Message edited by: Al_Po ]

Top
#100815 - 2003-05-08 03:54 PM Re: Applying Registry Settings
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
mmm...I think it would be better if you did restart the client..but you can try and restart some services depending on OS
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#100816 - 2003-05-08 03:57 PM Re: Applying Registry Settings
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
alpo!

you da bloody man!

not sure where all this will help but will indeed test with taskbar()

thanks for hope!
_________________________
!

download KiXnet

Top
#100817 - 2003-05-08 05:10 PM Re: Applying Registry Settings
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
Lonkero,
Great! Let me know if it helps.

AzzerShaw,
Not sure if you understand the problem this solves... There are times when you make changes, that do not need a reboot. For example, under normal circumstances, to change your Screensaver you would go to properties, screensaver, change it, change the delay, etc. The last thing you do is hit ok/apply. Done. No reboot necessary. However, if you made the same changes to the registry, manually or through a script, these changes would never "Apply" until you reboot/logged off and restarted explorer. Just adding the setm command tells the OS to check for updates and best of all... "Applies" them.

Top
#100818 - 2003-05-08 09:12 PM Re: Applying Registry Settings
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Hmmm... I may have to try that with my StartMenu UDF as well. [Big Grin]
Top
#100819 - 2003-05-08 09:33 PM Re: Applying Registry Settings
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doc, did you even try that startmenurefresh() yet?
_________________________
!

download KiXnet

Top
#100820 - 2003-05-08 09:46 PM Re: Applying Registry Settings
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, this does not work for taskbar() [Frown]
_________________________
!

download KiXnet

Top
#100821 - 2003-05-08 10:10 PM Re: Applying Registry Settings
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Yes, I tried the startmenu refresh and it did not work for my ModifyStartMenu()
http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=12;t=000279

Sorry I did not get back to you on it.

http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=12;t=000363

Top
#100822 - 2003-05-08 10:13 PM Re: Applying Registry Settings
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
Out of curiousity... what is not refreshing in your taskbar() UDF?
Top
#100823 - 2003-05-08 10:23 PM Re: Applying Registry Settings
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
explorer [Wink]

the taskbar udf has ability to set taskbar location (bottom-side-top) and it's size (in pixels and in lines)

that needs normally a explorer.exe kill and restart.
that is the part that is not refreshing.
_________________________
!

download KiXnet

Top
#100824 - 2003-05-08 11:50 PM Re: Applying Registry Settings
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
[Embarrassed] Hehe... I hadn't had a chance to try your UDF...

Just on a whim I tried the other 'set' commands too on your UDF... didn't work either. [Frown]

Also tried the refreshdesktop() udf... no go...

I hate stuff like this... There must be a way to do this without stopping Explorer because you can move it in the GUI. Urgh! [Razz]

Top
#100825 - 2003-05-08 11:53 PM Re: Applying Registry Settings
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sure they work.

but how they work is totally different thing.

refresh is indeed just for refreshing the start-menu items.

on the other hand, if you run the taskbar setting during logon, it will be applied too.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 388 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.18 seconds in which 0.106 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org