How to Force a Certain Wallpaper for Users

I received a request from one of my site admins the other day as to how she could force the wallpaper for all of her users. I looked through group policy and all I could find was an option for Active Desktop wallpaper, which wasn’t going to work. A bit of googling around and I found a nice little utility, SetWallpaper.exe. Grab it at http://optimumx.com/Download/SetWallpaper_1.10.zip.


I extracted setwallpaper.exe to the netlogon share for my domain as well as placing the wallpaper bitmap there. You could drop it in the group policy scripts folder too, but this was easier, and legacy client friendly too. I added the following snippet to the logon script for the group policy affecting this site:


Dim shl
Set shl = WScript.CreateObject(“WScript.Shell”)


Dim fso
Set fso = WScript.CreateObject(“Scripting.FileSystemObject”)


Dim pathToNetlogon
pathToNetlogon = shl.ExpandEnvironmentStrings(“%LogonServer%\NetLogon”)


Dim winDir
winDir = shl.ExpandEnvironmentStrings(“%windir%”)


FSO.CopyFile pathToNetlogon & “\thewallpaper.bmp”, winDir & “\thewallpaper.bmp”, True
shl.Exec pathToNetlogon & “\setwallpaper.exe ” & winDir & “\thewallpaper.bmp /D:C”


If you’re up for a batch script based solution, something like this should work:
copy /y %logonserver%\thewallpaper.bmp %windir%\thewallpaper.bmp %windir%\setwallpaper.exe %windir%\thewallpaper.bmp /D:C


That /D switch has three options Center, Tile, and Stretch as detailed in the readme.

Share this post: email it! | digg it! | bookmark it! | live it!

Leave a Reply

Your email address will not be published. Required fields are marked *