Page 1 of 1 1
Topic Options
#18805 - 2002-03-19 02:34 PM writing and applying registry settings
Keerat Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 15
Loc: London
All,

I used the following script to force a background colour onto the machines at logon, but...

**************************************************
; * Force Background Color settings for NT systems [Begin] *
; * Only applies settings to workstations
; * This will not take effect until the next time the system is rebooted...
; * Possible settings:
; * $bgcolor: RGB values as 'r g b'

if existkey($HKLM+'\System\CurentControlSet\Control\Terminal Server')=0
$TerminalServer=1
endif

$RegKey='$HKCU\Control Panel\Colors'

select
case 1 ; workstation
$Bgcolor = '51 154 153'

endselect

$result=writevalue('$RegKey','Background','$Bgcolor','REG_SZ')
*************************************************

NOW... the settings get applied, but only after you reboot twice! Im assuming Ive missed out an "apply" line of some sort.

Anybody have any ideas?

Thanks again

K

Top
#18806 - 2002-03-19 02:54 PM Re: writing and applying registry settings
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why start another thread when you have the same question (and answers) in this one?
Desktop Background Colour
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#18807 - 2002-03-19 03:11 PM Re: writing and applying registry settings
Keerat Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 15
Loc: London
just,

thought nobody noticed it...

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 373 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.051 seconds in which 0.022 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