Using Group Policy to configure Desktop Wallpaper (“Background”)



Group Policy is of course one of the best ways you can lockdown and configure your windows systems in your environment and one of the most commonly configured setting in Group Policy is the ability to configured the Desktop Wallpaper (a.k.a. Background) image. Now most of you might just say is all you need to do is set the  group policy setting however there are some common traps that you might fall into if you don’t use this setting correctly.

Method #1: Administrative Template “Desktop Wallpaper” Setting

The “Desktop Wallpaper” method is of course the most commonly used way for configuring the Wallpaper on a computer however as it seems with all things Group Policy using this setting comes with its own pro’s and con’s.

Pro’s

  • Change is Restricted for the users
  • Works on all versions of Windows

Con’s

  • Limited targeting only based on standard Group Policy Object’s (OU,Security Filter,Site,WMI & Domain)

This setting can be found under User Configuration > Administrative Templates > Desktop > Desktop and is straight forward to configure as all you have to do is specify the explicit local path or a UNC to the image you want displayed as the desktop wallpaper (see below).

image

Behind the scenes all this setting is doing is configuring the REG_SZ “Wallpaper” and the REG_SZ “WallpaperStyle”  registry keys under the HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System  path.

TIP #1: If you are running Windows 7/Server 2008 R2 pre-Service Pack 1 you will need to install hotfix http://support.microsoft.com/kb/977944 for this setting to work.

TIP #2: If you are configuring this setting I recommend that you use the “Fill” Wallpaper Style as this will work best with most screen resolutions (especially on Windows 7).

TIP #3: If you configure this setting you will need to wait for the user to logoff the computer before the background is updated.



Method #2: Group Policy Preferences Registry Key Wallpaper Configuration

As I mention in Method #1 all the Administrative Template “Desktop Wallpaper” does is configure the HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System REG_SZ “Wallpaper” key. Therefore you can also use the Group Policy Preference Registry Extension option to also set the same key to give you some added benefits.

Pro’s

Con’s

  • Must run Windows XP (or greater)
  • Must have the Group Policy Client Side Extensions installed.

To configured the Desktop Wallpaper the same as the “Desktop Wallpaper” administrative template simply create two registry keys User Configuration > Preferences > Windows Settings > Registry (see below). Now depending on the registry key that you configure for this setting you can either have this as a restricted (a.k.a. locked) setting or an unrestricted setting that allows the users to make their own changes.

Restricted: HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\Wallpaper

Unrestricted: HKCU\Control Panel\Desktop\Wallpaper

image

Restricted: HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\WallpaperStyle

Unrestricted: HKCU\Control Panel\Desktop\WallpaperStyle

image

Tip #4: If you don’t configured the “WallpaperStyle” registry key then users will still be able to choose their own Wallpaper Style.

If you chose the restricted registry keys to configured the wallpaper then ensure you also select the “Replace” action and “Remove this item when it is no longer applied” common option is selected (see below). If you don’t do this you will find that your users will not be able to change their wallpaper even after the policy is removed as the policy registry key will not be removed.

image

image

If you chose to use the unrestricted registry key values then also make sure you chose the “Apply once and do not reapply” option. If you don’t do this the users wallpaper will be reset ever time they log off their computer as the key will be set back to the original value during each policy refresh.

image

Configuring the Desktop Wallpaper Storage Location

Now that you know the many options for configuring the Desktop Wallpaper via Group Policy the next thing you should consider is where is the wallpaper being stored. As you can seen in the screen shots of the administrative template Desktop Wallpaper that they use the example of a UNC path. But…

image

TIP #5: DONT EVER USE A UNC PATH FOR A DESKTOP WALLPAPER… EVER!!

Simple put using a UNC path puts a lot of stress on network as it has to download file every time the wallpaper is loaded. It also means that if the network path cannot be contacted when the user logs on all they will get is a black background wallpaper. This is particularly obvious when someone logs on with a laptop not connected LAN.

So the obviously question is how do you make sure that file that the desktop wallpaper uses is always available and easily accessible? Use a script and copy the file to the local hard drive. Sure… but http://ihatelogonscripts.com and the issue with using a script is that it will only run when the computer starts up or when the user logs on. Generally this would not be a problem and if you are smart enough to use a copy program like robocopy or other such program it wont stress your LAN as it will only copy the file once. But on the day that you change the desktop wallpaper ever computer and/or user will try to download the new wallpaper all at once.

The Answer? Use Group Policy Preferences File Extension and copy the file down to the local computer.

Using the Group Policy Preferences File Extension

Using the File Extension to copy the file to the local hard drive means the file will be copied to the local hard drive making obviously available at all times. However the File Extensions options also has the advantage of being able to updated the file during each group policy refresh. This way the computer gets the updated wallpaper without having to logoff or reboot the computer and you avoid slamming the network in the morning when all the computers turn on.

image

TIP #6: Setup the file copy as a computer setting so that it will update the files even when there is no user logged on.

TIP #7: If you follow Tip #6 then you need to make sure that the desktop wallpaper file has got “Domain Computers” Read permissions so the local system account has access to copy the file from the network.

So by now, hopefully you know how to set the desktop wallpaper and so you can ensure that the images you use for the wallpaper are always available that way you  can ensure that your users are always subjected to your corporate desktop wallpaper.



37 Comments

    • Nevermind that question, I just reread the post and noticed the 2 Con’s listed.

      I added in the pre-login locations for desktop wallpaper and style from HKEY_Users\.DEFAULT\Control Panel\. Now to see if it actualy works.

  1. If you use method #1 it should still work on Windows XP however you will need to copy the file to a different location…. Group Policy Preferences do not work on Windows 2000 so that would never be an option… but REALLY!!! you use Windows 2000… Its been years since support has been dropped for that… you really need to upgrade ASAP…

  2. We have been told by head office to rollout a corporate desktop, so we want to set one via GP, but still allow users to change it if they want to. So I’ve just tried this on a Windows XP SP3 machine, using the Unrestricted Method #2. However when you do a gpupdate, or log off & on again, the desktop disappears, and you just get a blank background. If you go into Control Panel > Display > Desktop, it shows the correct wallpaper in the preview, but you have to click on it again to get it to display correctly. Also, doing this seems to change the file location “C:\Windows\Web\Wallpaper\Corplogo.jpg” to “C:\Documents and Settings\Username\Local Settings\Application Data\Microsoft\Wallpaper1.bmp”. I managed to get it to display by setting the location to the ‘ConvertedWallpaper’ registry entry, but this got over writen when you log off & on again.

  3. I used method 1 and had some issues with it. For some reason the wallpaper would show up when logging on but once the desktop loaded up it just reverted to a black background. I converted the JPEG to a Bitmapped image and it seemed to work. However I can only get this to work on XP Pro Service Pack 3. It won’t work for some reason on Windows 7 Professional, but it does show up as a black background and the user is unable to change the wallpaper- so I know the Group Policy has applied to that user it just isn’t showing the image! Can anyone help?

  4. Thanks for this post Alan.

    I’m implementing it in a windows 2008 domain with xp, vista and 7 clients.

    i’m also trying to get the files copied locally rather than specifying a unc path (which we currently use – and yes, we have some problems with this, but not to many people complain when the problem occurs as they dont like the desktop we force on them :-)
    However, when i am trying to copy the file to our win xp machines (using the gpo file update extension that you mentioned) they dont seem to receive the file at all (i tried setting up a file copy using computer and user policies extensions).

    do i need to roll out a x64 and x86 extension plugin for all the xp machines (using another gpo) before the file copy takes place (even though all our win xp boxes are sp3 or better)? (also, do i need to create the destination folder using a folder creation extension or will the file creation extension create the folder if it doesnt exist when plumping the file on the destination computer?

    many thanks for your time and effort posting your guide.

  5. Hi Guys

    Tried to impelement like the following way: HKCU\Control Panel\Desktop\Wallpaper (the user can change the wallpaper if the dont like it!)

    Set the Regkey over CSE to c:\temp\img1.jpg (just for testing) but there is noting changing… I can browse or manually use the jpg from there.
    Removed the BGInfo stuff for testing
    Its native W2k8R2 with W7 SP1 environment

    Still not working, any idea?

  6. Has anyone noticed the reg key path doesn’t exist if you navigate? I’ve tried this also but not working! Like the post and agree we shouldn’t be using a UNC pathway – open to suggestions – I’ve triple checked everything!

  7. We have a lab with 50 pc. I want all users which loggin on in this lab to have one special background. I made a gpo for that.
    But we use roaming profiles and so the settings from the lab overwrite the usersettings… and if the users go to their own desktops, they have the lab-background.

    ???

  8. Pingback: How to use Group Policy to configure Windows 7 Logon UI Background Wallpaper | Yogesh(Yogi)

  9. Pingback: Best Practice: How to use Group Policy to configure Windows 7 Logon UI Background Wallpaper

  10. Pingback: Desktop background niggle via GPO

  11. Thanks for this great tutorial :)
    I testet Method #2 and it`s exactly what we where looking for.
    I still have one tricky question: some of our User are working at different PCs quite often and the GPO just sets the Picture only once. Is there a way to trigger it one time per User per Pc?

    Thanks for any Ideas

    • I tried this method 2 but I am getting blank (dark background) on my domain systems.

  12. I am trying to implement this, but I need help with writing a script (I don’t want to use the unc path for a desktop). Can you help me with a sample script and how to execute it. Thanks

  13. If you want to build teamwork, you will definitely want to practice together, of course.
    So, strap on all your paintball gear and load up those paintball guns!
    If” scenarios, and more, work on offensive and defensive strategies, code words, “what-.
    Gain knowledge from the opposition as well as your own teammates.
    Tightly see other paintball players to produce new and winning strategies for long term games.
    Does the opposite crew discuss greater than your staff does?

    Can they appear to be more arranged? Focusing on how
    your competitors interact with each other might help boost your team’s
    functionality. Take a look at your opponents paintball gear and see if your team is lacking in that area.
    This will greatly effect your gameplay

    Feel free to visit my blog post … Paintball shop

  14. I loved as much as you’ll receive carried out right here.
    The sketch is attractive, your authored subject matter stylish.
    nonetheless, you command get bought an nervousness over that you wish be delivering the following.
    unwell unquestionably come more formerly again as exactly the same nearly a
    lot often inside case you shield this increase.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>