Screen Saver via GPO KB ID 0001281
Problem
I was tasked with working out how to do this for a client a couple of weeks ago, so I thought it would make a decent article. I’m going to have a central server share, with some photos in, then I’m going to copy them down to all the clients, and finally set their screen saver to use those photos as a ‘slide show’ screen saver.
I’ve done this with Windows 10 clients, but it should work with anything newer than Windows XP.
Solution : Screen Saver via GPO
Create a share folder to put all your photos in, I’m setting Share Permissions Everyone = Read, then on the Security tab, Domain users = Read, and Domain Admins = Full Control.
Now I’m creating a basic script that will map a drive letter (x:) on the client machine to that share, and copy down all the photos into a folder called “C:\IT Dept\Screensaver”. Save the file with a .bat (batch file) extension.
Now create (or Edit) a GPO thats linked to the OU that contains your users, (remember the thing that looks like an OU in AD called users, isn’t an OU, it’s a ‘container’).
Edit your group policy.
Run a Logon Script from Group Policy
Navigate to;
[box]User Configuration > Policies > Windows Settings > Scripts > Logon > Properties[/box]
Add > Browse.
Now, STAY in the folder when it opens, and copy/paste your batch file in there, its icon should look like the one below.
Open > OK > Apply.
Set ScreenSaver Settings via Group Policy
Navigate to;
[box]User Configuration > Policies > Administrative Templates > Control Panel > Personalization >Force specific screen saver [/box]
Enable the policy and type in PhotoScreensaver.scr > OK > Apply.
Leave the policy editor open!
Screen Saver via GPO : Windows 10 Screen Saver Settings
These are well hidden, thanks Microsoft! Remember these setting can be deployed to Win7/8 as well. You need to have the local folder with the photos in already to get some settings from, you will have to do this one manually just make sure the folder path is correct!
On a client machine > Start > Settings > Personalization > Lock Screen.
Scroll down > Screen Saver Settings > Set ‘Photos’ > Settings.
Browse to the photo folder > Tick Shuffle Pictures > Save.
Run regedit and navigate to;
[box]HKEY_CURRENT_USER > Software > Microsoft > Windows Photo Viewer > Slideshow > Screensaver[/box]
Right click and export the whole ‘Screensaver’ key, save it somewhere you can find it.
Now copy the file you just exported to the server, and double click it to ‘merge’ it into the registry.
WARNING: There is a registry value in here called EncryptedPIDL, it’s the actual path to the folder that contains the photos, and it’s been encrypted. Because Windows is a bit stupid, it breaks the text down so when you try and import/merge it, it does not work. Also it does not tell you anything went wrong. You can open the file you exported in Notepad, and disable word wrap, then make sure that the EncryptedPIDL value copies over correctly. Or simply create a new ‘string value‘ called EncryptedPIDL and copy and paste it directly from your client onto the servers registry value.
Back in the policy editor that you left open above, navigate to;
[box]User Configuration > Preferences > Windows Settings > Registry > New > Registry Wizard > Next[/box]
Browse down to;
[box]HKEY_CURRENT_USER > Software > Microsoft > Windows Photo Viewer > Slideshow > Screensaver[/box]
Select all the values as shown, (if you cant see EncryptedPIDL see my warning above) > Finish.
Close the policy editor and wait for the policy to apply, or force it on the clients.
Related Articles, References, Credits, or External Links
NA
Thank you, this was very helpful. I was trying to figure out the easiest way to get this accomplished. My marketing department wants to do this across our 4 different brands, and though there will be some back-end script changes that will need to be made when they want to change the images, it shouldn’t be too bad. Thanks for writing this up!
No worries, thanks for the feedback
P
Thanks dude. Nice fix. I followed your instructions and it worked like a champ. I just needed to make a few changes on the logon script and change the power plan settings on the GPO. But afterwards everything was smooth sailing!
Thumbs up to you!
Nice one thanks for the feedback!
P
Hey Sean
Do you mind sharing changes to logon script
Alternative logon script to also delete old images which can be reduced to a single command:
robocopy /mir “\\SERVERNAME\Folderlocation\” “C:\IT Dept\Screensaver\”
If the logon script is changed to the above, you will not need to make changes to the script to update the screensaver image and it will enforce standard image(s) on all computers.
Each time the script is run, it will sync the contents of the network folder with the C drive folder (including removing images/folders added by the local users and previous screensavers etc.).
This script also has the following benefits:
It will create the C:\ folder if it’s missing
This script will automatically re-try if there are network issues (There are switches to limit retries if required, see robocopy usage: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy)
Using this method, the shared folder shouldn’t need to be mapped as long as the folder permissions are ok.
If there are no changes, it will not copy anything.
Hope this helps!! 🙂
N.B. Although this is probably the intended behaviour anyway, I thought I should clarify the below:
1. Anything in the destination folder that doesn’t exist in the network folder will be removed (There won’t be anything if it’s a new folder).
2. Any other files or subfolders in the source folder will also be copied across as well (There shouldn’t be anything if it’s a new folder).
The ” WARNING” PORTION WAS THE VERY IMPORTANT….. PART OF THE WHOLE STUFF. WHICH I WAS MISSING .
THANKS
This is best I could find but there is a simpler way. Use ACDSee(trial) to create SCR file (load folder > Create menu). Put this SCR on a shared folder and use UNC path to deploy it.
Cheers.
Does this work up to 1803. I am looking at the HKEY_CURRENT_USER > Software > Microsoft > Windows Photo Viewer > Slideshow > Screensaver but this path does not exist or populate when saving the settings. Wondering if this is another change since 1709?
Amazing article It solved my problem. Gory to God
Hi there,
Since this GPO is at the User level, is there a way to disable it Server OU?
Cheers.
Yes use a WMI filter 🙂
To confirm I would have to go around every computer to configure the screensaver?
No it’s a GROUP policy? 🙂
exactly my view if i have to move to every workstation then using group policy is useless
Does it work on lock screen as well? Because we have policy enforced ” lock screen” after certain time if machine deducts no activity. How we can integrate these two seeings.
Im pretty sure it doesn’t that will be another setting.
Hi,
Thanks for this tutorial.
with me it works perfectly except that when I execute the command gpupdate / force the photos that I loaded in the folder does not rotate anymore. I just see a black screen and I have to reconfigure on the Windows computer to make it work again. Thanks for the assistance.
hey , is this script correct ?because my script cannot copy pictures into IT DEPT\screensaver files
Are you sure ?
Thats not what it does, that copies files FROM a server TO a local PC?
Thanks for this very helpful article. Anyway, your EncryptedPIDL solutions did not work for me after several tries. So what did I do? Instead of pasting the value copied directly from client registry editor into server registry editor, I pasted the value into the “registry editor” in the group policy management editor itself – meaning I had to expand “User Configuration > Preferences > Windows Settings > Registry ” further until I could edit the EncryptedPIDL value there. After that my screensaver worked as intended.
i have a question.
i will like to confirm if the screen savers still come up even when the computers are off the network
Indeed, a great article. None other articles explained this.
Thanks to the savior.
“…Save the file with a .bet (batch file) extension…”
It’s a .bat file, not a .bet file. The screenshot is correct 🙂