Group Policy will, by default, only set the desktop wallpaper using Active Desktop. It is also possible to set the wallpaper using the logon script, or using a custom Group Policy template.

Custom Group Policy Template

The first thing to note about the custom policy is that it is an Unmanaged Policy. That means that any setting change will not revert if the policy is set to Disabled or Not Configured. The setting would have to be manually reversed or removed.

The second thing to note is that Unmanaged Policies are not displayed by default. After adding this template select the Administrative Templates folder under User Configuration, then View and Filtering. Remove the tick from “Show only policy settings that can be fully managed”. The policy will appear with a red icon instead of the regular blue icon.

This is a template that can be used to set the wallpaper on a client. It must be saved as a Administrative Template (.adm) file and manually added into a policy.

[code lang=”plain”]
CLASS USER

CATEGORY “Desktop”
CATEGORY “Custom Policies”
KEYNAME “Control PanelDesktop”

POLICY “Desktop Wallpaper”
EXPLAIN !!ExplainText

PART !!WallpaperPathText EDITTEXT REQUIRED
VALUENAME “Wallpaper”
END PART

PART !!WallpaperStyleText DROPDOWNLIST
VALUENAME “WallpaperStyle”

ITEMLIST
NAME “Centre” VALUE NUMERIC 0 DEFAULT
NAME “Stretch” VALUE NUMERIC 2
END ITEMLIST
END PART

PART !!TileWallpaperText DROPDOWNLIST
VALUENAME “TileWallpaper”

ITEMLIST
NAME “No” VALUE NUMERIC 0 DEFAULT
NAME “Yes” VALUE NUMERIC 1
END ITEMLIST
END PART
END POLICY
END CATEGORY
END CATEGORY

[Strings]
ExplainText=”Specifies the desktop background (wallpaper) displayed on all users’ desktops.nnThe wallpaper image must be in bitmap (bmp) format.nnTo use this setting, type the fully qualified path and name of the file that stores the wallpaper image. You can type a local path, such as C:Windowswallpaper.bmp or a UNC path, such as \ServerShareCorp.bmp. If the specified file is not available when the user logs on, no wallpaper is displayed. You can also use this setting to specify that the wallpaper image be centered, tiled, or stretched.nnTo set wallpaper to Centre Tile must be disabled. To set wallpaper to Tiled both Centre and Tiled must be selected.”
WallpaperPathText=”Full UNC or path to Bitmap (bmp) file:”
WallpaperStyleText=”Centre or Stretch Wallpaper:”
TileWallpaperText=”Tile Wallpaper (if centre is selected):”

VbScript

Alternatively, the same registry entries can be set using VbScript. This has the potential to be more flexible depending on the environment. It will run under a standard user, no need to grant extra rights on the PC.

Random wallpaper with VbScript

I once had to deploy one of a selection of wallpapers to client computers on a network. It had to change (or at least attempt to change) each time the user logged on. This snippet uses the Randomize function in VbScript to generate a random number and pick a random file.

Leave a Reply

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