Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling Desktop Colour with Group Policy

Status
Not open for further replies.

StooPot

MIS
Dec 17, 2003
4
GB
I am running Windows 2000 server, using Active Directory. I am about to roll out windows XP upgrade to all clients and am trying to create Group Policys to manage the desktops. I have installed the Group Policy Centre Snapin on AD and have managed to configure everything apart from the desktop Background Colour! I have changed the wallpaper without any problems but as default the icons have a dark blue back ground. When the wallpaper is black!

I have looked every where for the option, does this need to be done in a script? If so could some one help me out there as my scripting skills are very basic.

Thank you for your time.

Stoo..
 
You will need to do this with a script.

Note that the colors listed below are in RGB format. Here is a sample that sets the colors to be that of the desert theme.

Code:
'==========================================================================
'
' VBScript Source File -- 
'
' NAME: desertTheme.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: [URL unfurl="true"]http://www.thespidersparlor.com[/URL]

' DATE  : 04/22/2003
'
' COMMENT: 
'
' This script sets the desktop theme to "Desert"
'===========================================================================


on error resume next
Set WSHShell = Wscript.CreateObject("WScript.Shell")

path = "HKCU\Control Panel\Appearance\"

WSHShell.RegWrite path & "Current", "Desert","REG_SZ"
  
path = "HKCU\Control Panel\Colors\" 
  
WSHShell.RegWrite path & "ActiveBorder","213 204 187", "REG_SZ"
WSHShell.RegWrite path & "ActiveTitle","0 128 128", "REG_SZ"
WSHShell.RegWrite path & "AppWorkSpace","162 141 104", "REG_SZ"
WSHShell.RegWrite path & "Background","162 141 104", "REG_SZ"
WSHShell.RegWrite path & "ButtonAlternateFace","192 192 192", "REG_SZ"
WSHShell.RegWrite path & "ButtonDkShadow","0 0 0", "REG_SZ"
WSHShell.RegWrite path & "ButtonFace","213 204 187", "REG_SZ"
WSHShell.RegWrite path & "ButtonHilight","234 230 221", "REG_SZ"
WSHShell.RegWrite path & "ButtonLight","213 204 187", "REG_SZ"
WSHShell.RegWrite path & "ButtonShadow","162 141 104", "REG_SZ"
WSHShell.RegWrite path & "GradientActiveTitle","132 189 170", "REG_SZ"
WSHShell.RegWrite path & "GradientInactiveTitle","232 208 128", "REG_SZ"
WSHShell.RegWrite path & "GrayText","162 141 104", "REG_SZ"
WSHShell.RegWrite path & "Hilight","0 128 128", "REG_SZ"
WSHShell.RegWrite path & "HotTrackingColor","0 128 128", "REG_SZ"
WSHShell.RegWrite path & "InactiveBorder","213 204 187", "REG_SZ"
WSHShell.RegWrite path & "InactiveTitle","162 141 104", "REG_SZ"
WSHShell.RegWrite path & "InactiveTitleText","255 255 255", "REG_SZ"
WSHShell.RegWrite path & "InfoWindow","255 255 255", "REG_SZ"
WSHShell.RegWrite path & "Menu","213 204 187", "REG_SZ"
WSHShell.RegWrite path & "Scrollbar","234 230 221", "REG_SZ"
  
path= "HKCU\Control Panel\Desktop\WindowMetrics"
WSHShell.RegWrite path & "BorderWidth","-15","REG_SZ"

WSHShell.RegWrite path & "IconSpacing","-1125", "REG_SZ"

WSHShell.RegWrite path & "ScrollHeight","-195", "REG_SZ"
WSHShell.RegWrite path & "ScrollWidth","-195", "REG_SZ"
WSHShell.RegWrite path & "Shell Icon Size","32", "REG_SZ"

WSHShell.RegWrite path & "SmCaptionHeight","-225","REG_SZ"
WSHShell.RegWrite path & "SmCaptionWidth","-225","REG_SZ"
 
path= "HKCU\Control Panel\Desktop\"
WSHShell.RegWrite path & "Wallpaper","","REG_SZ"

path= "HKCU\Software\Microsoft\Internet Explorer\Desktop\Components\"
WSHShell.RegWrite path & "GeneralFlags", "00000000", "REG_DWORD"
  
  
path="HKCU\Software\Microsoft\Internet Explorer\Desktop\General"
WSHShell.RegWrite path & "BackupWallpaper","","REG_SZ"
WSHShell.RegWrite path & "Wallpaper","","REG_SZ"
WSHShell.RegWrite path & "WallpaperFileTime","00,00,00,00,00,00,00,00", "REG_BINARY"
WSHShell.RegWrite path & "WallpaperLocalFileTime","00,28,A1,53,C5,FF,FF,FF", "REG_BINARY"

MsgBox"Done"

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Cheers!!

That looks like it does the job, but not to sure which script to put it in the Logon or Startup? For some reason it does not always take affect stright away and requires logging in and out and maybe even a reboot before it seems to work? have you had any problems?

I have edited your script to just leave the Background setting in

' This script sets the desktop colour to black

on error resume next

Set WSHShell = Wscript.CreateObject("WScript.Shell")

path = "HKCU\Control Panel\Appearance\"

WSHShell.RegWrite path & "Current", "Desert","REG_SZ"

path = "HKCU\Control Panel\Colors\"

WSHShell.RegWrite path & "Background","0 0 0", "REG_SZ"

Is this correct or is there some thing wrong in the script which is causing the delay in the setting taking affect?

Thank you once again for your help.

Stoo..
 
Sorry I should have warned you about the delay. This rights to the Current User registry hive and is only loaded at login, so the first time the user logs in it is set. After that they see the change.

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top