Let’s consider how to deploy the same desktop background image (wallpaper) on all Windows workstations in the Active Directory domain using Group Policies. As a rule, it is important for large businesses that require all employees using the same corporate desktop background image on all computers.
We’ll need an image file you want to use as a desktop wallpaper. It can be a BMP or JPG file.
This image file can be pre-copied to all computers, but it is more convenient if the clients take the jpeg file automatically from the shared network folder. To do this, you can use a file server, a SYSVOL folder on the domain controllers or a DFS folder. We have chosen the second variant for our distributed network since the SYSVOL contents are automatically replicated between all DCs and allow reducing WAN traffic between the branch offices when the clients are getting the image file.
Copy the image file on any domain controller to the C:\Windows\SYSVOL\sysvol\woshub.loc\scripts\Screen folder. An UNC path to this file looks as follows: \\woshub.loc\SYSVOL\woshub.loc\scripts\Screen\corp_wallpaper.jpg.
Check that the domain users have read permissions for this file (grant Read NTFS permission for the Domain Users or Authenticated Users group).
How to Configure Desktop Wallpaper Settings via GPO?
Open the domain GPO Management console GPO (GPMC.msc). Create a new policy and assign it to the necessary OU with the users (in our case, we want the policy to be applied to all domain computers and servers, so we just edit the Default Domain Policy). Switch to the policy Edit mode.
Go to the section User Configuration -> Policies -> Administrative Templates -> Desktop -> Desktop.
Enable the policy Enable Active Desktop.
Then enable the Desktop Wallpaper policy. In the policy settings, specify the UNC path to the jpeg image file and select Fill as a wallpaper style.
To make sure that the policy has been enabled on a user’s computer, log off and sign in again. The user’s desktop should display the specified wallpaper image.
If you have to prevent users from changing the wallpaper image, enable Prevent Changing Desktop Background policy in User Configuration -> Administrative Templates -> Control Panel -> Personalization.
select * from Win32_OperatingSystem where Version like “10.%”
Set Desktop Wallpaper via Registry and GPP
You can set the parameters and the desktop wallpaper image through the registry. The path to the wallpaper image file is stored in the registry parameter Wallpaper (REG_SZ) under the registry key HKEY_CURRENT_USER\Control Panel\Desktop\ or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System. You need to specify the UNC path to your image file in this registry parameter.
In the same registry key, the WallpaperStyle parameter (REG_SZ) sets the position of the image on the desktop. Use 2 to center and stretch the image.
If you want to prevent users from changing the desktop background. Create the following registry key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop]
"NoChangingWallPaper"=dword:00000001
These registry settings can be deployed to users’ computers through the special GPO extension – Group Policy Preferences (GPP). To do this, go to the User Configuration -> Preferences -> Windows Settings -> Registry section and create two registry settings with the Update action.
With Group Policy Preferences Item Level Targeting, you can assign wallpaper policies to clients more accurately. For example, in the registry setting policy on the Common tab, enable Item level Targeting, click the Targeting button and use a simple wizard to specify that the wallpaper policy settings should be applied to computers with Windows 10 and users from a specific AD security group.
Similarly, you can make several different wallpaper files for different user groups (or devices). By adding the necessary users to AD groups, you can set different desktop wallpapers for different categories of employees.
Also, you can change the login screen image. To do this, you can use the Force a specific default lock screen image policy in the GPO section Computer Configuration -> Policies -> Administrative Templates -> Control Panel -> Personalization or through the following registry keys:
- HKLM\Software\Policies\Microsoft\Windows\Personalization — LockScreenImage — path to jpg image for the lock screen;
- HKLM\Software\Policies\Microsoft\Windows\Personalization — LockScreenOverlaysDisabled = 1;
- HKLM\Software\Policies\Microsoft\Windows\System — DisableLogonBackgroundImage = 0.
Why Desktop Wallpaper Group Policy Doesn’t Work for Windows 10 Clients?
On computers running Windows 10, the desktop wallpaper policy may not apply immediately. The fact is that Windows 7 and Windows 10 use the desktop background cache differently:
- In Windows 7, every time a user logs on to the system, the background wallpaper cache is automatically regenerated;
- In Windows 10, if the path to the wallpaper image has not changed, the cache doesn’t update. So the user will see the old desktop background, even if you updated the jpeg file in the shared folder on the server.
For Windows 10, you can add an additional logoff script that clears the image cache on the user sign out. It could be a bat file Clear_wallpaper_cache.bat with the following code:
del /F /S /Q %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper
del /F /S /Q %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Themes\CachedFiles\*.*
As a result, the desktop background image for Windows 10 users will be applied normally.
12 comments
Group policy works only once for win 10 clients.
I mean, when a user login to a win 10 client PC, It gets the wallpaper from server.
Now if we change the wallpaper on the server (By replacing that .bmp file with same name) it never changes on client computer.
However if a new user login to the same PC, it gets the new wallpaper.
Can you please help!
Thanks.
Try to use a different file name
This won’t work for a Computer object OU as desktop wallpaper is User config? You need loopback enabled right??
In this example GPO is targeted to the users OU. If you want apply background policy to OU containing computers, you should enable loopback mode.
Hello dear,
I need your help How to change the wallpaper on a daily or weekly basis? but having GPO.
Greetings and thanks! Richard
I think you’ll have to use the scheduler tasks or PowerShell scripts to change the path to wallpaper file in registry.
[HKEY_CURRENT_USER\Control Panel\Desktop]
"Wallpaper"=" C:\Windows\SYSVOL\sysvol\woshub.loc\scripts\Screen\mon.jpg"
Also you can daily replace shared wallpaper file \\woshub.loc\SYSVOL\woshub.loc\scripts\Screen\corp_wallpaper.jpg using the task scheduler on DC.
Hello admin!
Thank you for your prompt response,
You are currently applying problems, I mean that it is updated automatically every day.
Regards,
Richard
@echo off
echo.
echo Eliminando el archivo fondo de pantalla existente…
echo.
del /q C:\Scripts\Wallpaper\wallAplicated\wallpaper.jpg
echo.
echo Configurando las variables aleatorias…
echo.
C:
CD C:\Scripts\Wallpaper\wallpapers\
echo.
set /a myRand=%random%%%20+1
set /a myRand=%random%%%20+1
echo.
echo Copiando y renombrando el archivo aleatorio al directorio GPO para ser aplicado…
echo.
copy wallpaper%myRand%.jpg C:\Scripts\Wallpaper\wallAplicated\wallpaper.jpg
echo.
echo Listo!! El fondo de pantalla ha sido cambiado satifatoriamente!
echo.
echo Esperando 5 Segundos para finalizar…….
timeout /t 5
Exit
—————————————————————————–
I am currently applying this script found here, which is excellent, but I repeated the images the next day: http://www.edugeek.net/forums/windows-server-2008/104870-change-wallpaper-daily-via-gpo.html
I was able to apply the indicated script every day with 20 wallpaper, however, I have noticed that sometimes the same image is repeated a few times.
How can I solve so that the same image is not repeated in those 20 days? so that all the wallpaper will be applied.
Greetings and thanks in advance for your answers.
Richard
You can try to rename jpg files in the C:\Scripts\Wallpaper\wallpapers\ folder every day according to the following scheme. For example, you have 5 jpg files:
wallpaper.jpg – (current wallpaper image)
wallpaper1.jpg
wallpaper2.jpg
wallpaper3.jpg
wallpaper4.jpg
wallpaper5.jpg
Next to rotate wallpaper files use the following code:
REN wallpaper.jpg wallpaper_tmp.jpg
REN wallpaper1.jpg wallpaper.jpg
REN wallpaper2.jpg wallpaper1.jpg
REN wallpaper3.jpg wallpaper2.jpg
REN wallpaper4.jpg wallpaper3.jpg
REN wallpaper5.jpg wallpaper4.jpg
REN wallpaper_tmp.jpg wallpaper5.jpg
Ok excellent, they also gave me that same idea and it works for me. I think it was the most practical and uncomplicated.
Expert Comment by:Steve Knight
https://www.experts-exchange.com/questions/29095902/How-to-change-the-wallpaper-randomly-to-all-users-of-the-domain-every-day-without-being-repeated.html
Thank you very much for helping me!
Regards!
Hi We deploy Wallpaper via GPO and it’s work well but when ever we switch Laptop network on wifi wallpaper not apply over wifi and see black screen only, in LAN network it’s working fine.
Thanks in Advance please help here
Strange problem. Is your domain controller accessible when connected via a Wi-Fi network?