Desktop wallpers via Group policy - question!

Soldato
Joined
9 Jan 2007
Posts
2,760
Location
Gibraltar
Ey guys, been racking my brain on this one:

Ok, scenario as follows.

650 users, roughly 20 departments each with their own OU in AD, one general policy for basic lockdown stuff, each OU also has a departmental policy, which applies particular folder redirections, etc. Standard stuff so far.

Departmental policies also apply a desktop wallpaper, so for example the IT policy has under "user configuration, policies, administrative templates, desktop, desktop" --> prohibit changes (to wallpaper) set to enabled, and desktop wallpaper references a UNC path to the particular departments wallpaper.

Ok so far, all wallpapers copy across, display, and cannot be modified by the end-user.

But...we have a wide mix of screen resolutions across the board, most common being 1440x900 (19" widescreens) and 1024x768 (17" 4:3 flatscreens)

The wallpapers have a calendar which, depending on which resolution the desktop wallpaper is, looks distorted.

How do you guys get around this? Is there a VB script which can detect screen resolution and apply a particular wallpaper?

It's doing my head in :(
 
Design a wallpaper to the smallest res in a standard 4:3 aspect ratio, pad it with blank space then use the centre option for the wallpaper?

If you want to script it I am sure you can exploit bginfo and VBS to extrapolate screen resolution.
 
Last edited:
Yep thanks Sin, though about that but it will mess up the design and end up with an ugly black band all around, and the departmental logo has to be on the bottom right of the screen, not somewhere in the middle of the screen.

Eeesh...pain in the rear end this...
 
Code:
strComputer = "."
strWidth = ""
strHeight = ""
strRes = ""


Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery _
    ("Select * From Win32_DisplayConfiguration")

For Each objItem in colItems
    strWidth = objItem.PelsWidth
    strheight = objItem.PelsHeight
Next

strRes= strWidth & strHeight

Set objShell = CreateObject("Wscript.Shell")
objShell.Run "\\10.32.16.1\Wallpapers\BgInfo\BGinfo.exe \\10.32.16.1\Wallpapers\BgInfo\" & strRes & ".bgi" & " /timer:0 /ALL /NOLICPROMPT, 1, True"

Modify UNC paths appropiately and dump bginfo.exe an the bginfo .bgi config files in there and create your wallpapers using BGINFO and saving out the .bgis

The script passes strRes to the BGinfo CLI as the widthheight so for 1280x1024 it passes 12801024.bgi

This SHOULD work. I have not tested it but the code should be sound.
 
could always make their desktops to be "active desktops" so it loads a webpage instead of an image ... that way you can use simple javascript or php to resize and centre whatever html you want ... tis how we do it
 
Back
Top Bottom