There are times when you need to deploy new company screensaver to all PCs. You can use Group Policy for that, but the problem is that it will disable screensaver settings for users and they will not be able to change them. If you have SMS or SCCM you can use it to deploy screensaver. The whole process is very simple.
You will need 3 files:
screensaver file (screensaver.scr)
registry file which will configure screensaver settings (screenscr.reg)
batch file which will copy the screensaver and apply the settings (screenscr.bat)
The basic settings for screenscr.reg should look like this:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
“ScreenSaverIsSecure”=”1”
“ScreenSaveTimeOut”=”900”
“ScreenSaveActive”=”1”
“SCRNSAVE.EXE”=”C:\\WINDOWS\\screensaver.scr”
Create a batch(screenscr.bat) file and put the following lines:
@echo off
regedit /s screenscr.reg
copy screensaver.scr %windir%\
It might look strange that it applies the settings before copying the file but this is the only way it worked for me.
Put all three file in one folder and create a package pointing to it. Create a program and select screenscr.bat as your program. Also I’ve ticked Suppress program notifications because I don’t want them to be notified.
When creating advertising it is important in Advanced client tab select to Download program as shown below. If you don’t do that it will fail.
When the program runs on Client PC the user might see a command prompt popping up and disappearing. It does that very quickly so they might not even notice that.
Good stuff Andy!
Thanks for the guide!
I adapted it to install applications that require preference files copied afterwards.
Works like a charm 🙂
Very nice! If I may ask, how did you set the package to run? When I try to use “administrator rights” it doesn’t set screensaver at all.
Hi Steve,
don’t set it to run as administrator. Because screensaver is set individually for each user and as you can see the registry changes HKEY_CURRENT_USER which means that it will change the screensaver for the user who is currently logged on.
Hi Andy,
I have not tried yet, but if a screensaver of the same name but different content is running on the computer. There should be a access denied error when replacing the scr file. How can the screensaver be stop before copying the file without user intervention? Thanks
I have not tried to replace the existing file.
First the script will stop because the file already exists and user will be prompted for confirmation. You’ll need to add /Y switch to COPY command to supress that. If you want to stop running screensaver you can add TASKKILL command into batch file before the COPY command.