RG02E – Deploying a custom screensaver

By Max Ranzau

 

As an entrylevel tutorial, this short article will show you in a few easy steps how to deploy a custom screensaver to all your RES Workspace Managed computers and configuring it in one go. As usual at the end of the show, there will be a nice buildingblock for you to download and try out in your own lab environment.

Get ready

The first thing to do is to get a screensaver. The situation may be that you’ve been tasked with deploying a corporate screensaver for which somebody has paid a kings ransom to have developed, so now it better be showing on all idle desktops when the CxO comes by.

Complexity of screensavers may vary. The most simple screensavers are simply just a .SCR file which is dumped somewhere on the local filesystem of the target computer. If your particular screensaver comes with 117 different flying toasters bundled in a EXE or MSI file, requires DLL’s to be registered, is dependant on DirectX etc, you are probably better off deploying the screensaver using your favorite deployment tool (which could be RES Automation Manager, for example :) instead of trying to deploy it via custom resources. The screensaver I’ve chosen is a simple flash-based Clock screensaver which I found here.

Deploying the files

Once you’ve got the screensaver downloaded, all you need to do is to grab the .SCR file and any associated files and dump them into a Workspace Manager Custom resource.

  1. In the Workspace Manager Console, go to Setup | Datastore | Custom Resources
  2. Create a new folder, call it Screensaver for example. Be sure to click on this folder before proceeding so Workspace Manager knows where to add the files.
  3. Hit the Add button. Multi-select all the files that belong to the screensaver. In this case things were easy: All necessary files are located here c:\windows\RealSimpleAnniversaryClock.* but unfortunatly there is no sure way to know where everything is for all screensavers.

At this point the files will start to replicate out to all the local caches on each and every agent. The files will be available in %programfiles% \res powerfuse \data \dbcache \resources \custom_resources \Screensaver. However on each agent a variable called %rescustomresources% will point to the custom_resources folder. We will use this in the next step.

Configuring the screensaver

We need at this point to make sure the built-in RES Workspace Manager static screensaver is turned off. Presuming you have installed Workspace Manager 2010 or higher from scratch, then this should already be the case, as everything is turned off per default on a clean installation. Just to make sure, go to Composition | Desktop | Screensaver and make sure that it’s set to Disabled at the top. The reason we need to do this is that we don’t want the RES screensaver overriding our custom screensaver.

Last thing we need to do is to set up a registry hack that configures our screensaver, setting timeouts and all that stuff.

  1. Go to Composition | Other | User Registry, and Add a new registry hack.
  2. Create it so it looks like shown here on the right. Alternatively you shortcut and just download and import the buildingblocks below. The lesson to be learned here, is that it’s perfectly alright and allowed to use an environment variable as part of a RES Workspace Manager registry configuration set. You can even use a variable as a key or value name.

If you are more comfortable with importing registry keys, you can save the following registry snipped as a .reg file and import it into the Workspace Manager’s registry editor.  Inside the editor, go to the menu item Action | Registry | Import registry file…

REGEDIT4
;<PFNAME>Explorer, configure Demo Flash Screensaver</PFNAME>
;<PFDESC>Sets up a customresource based screensaver executable, timeout, security and enables it.</PFDESC>
[HKEY_CURRENT_USER\]
@=””
[HKEY_CURRENT_USER\Control Panel]
@=””
[HKEY_CURRENT_USER\Control Panel\Desktop]
@=””
“SCRNSAVE.EXE”=”%rescustomresources%\\screensaver\\RealSimpleAnniversaryClock.scr”
;<PF>Name of the screensaver executable. Make sure this exist. Tip: try distributing the screensaver executable with Setup|Datastore|Custom Resources and refer to it as %rescustomresources%\yourscreensaver.scr</PF>
“ScreenSaveTimeOut”=”1200”
;<PF>Amount of seconds before the screensaver kicks in.</PF>
“ScreenSaverIsSecure”=”1”
;<PF>When set to 1 the session/workstation will be locked when the screensaver is disengaged</PF>
“ScreenSaveActive”=”1”
;<PF>This should be set to 1 to enable the screensaver</PF>

If you are wondering what all the business with the <PF*> tags above are; this is Workspace Manager’s gift to you when you export a .reg file from the editor. It automatically inserts all your documented settings, comments etc along the actual values. In other words, if you import this elsewhere, say via a normal regedit.exe, it won’t choke on the file, as all the special tags are marked as comments. When you re-import the above into another Workspace Manager console, the comments are intact.

There, you’re done – here’s some more ideas:

You have finished this job. Next time the user logs on, the screensaver is now set. Here’s a couple of item to ponder. This is your chance to get dangerous (in the good sense :)

  • You could for example set up another environment variable under Composition | Other | Environment variables, which would allow you to set up a variable based on users/groups/ou, that would determine the value written into the SCRNSAVE.EXE registry value, thereby changing the screensaver per department, group, etc.
  • Another idea, which was actually implemented by a customer in the Nordics, was to make the ScreenSaveTimeout value dependent on physical locations. For example, this customer did not want the screensaver to kick in, if the computer is being used in one of their meeting rooms.  Combine a variable for the timeout with assignment to a Location/Devices Zone, and you’re well on your way to have Dynamic Screensavers configured in your enterprise.

As promised, click here to download the buildingblock from the Workspace Manager BuildingBlock Library. Once downloaded and unpacked, import the buildingblock in the RES workspace manager console under the menu Action | Import Building Block.

3 Comments

  • By Oliver Candy, December 10, 2010 @ 06:47

    A very useful and well written article. We (Sabercom) offer a business Screensaver where, once installed on all PCs, content can be updated automatically by communications/marketing managers. Customers are always asking for information about .SCR distribution and this article offers an excellent example.

  • By Hans Straat, May 7, 2015 @ 05:50

    Excelent article Max like always, can you verify the source screensaver is still available? I only get loads of commercial bs from that site.

  • By RESguru, May 7, 2015 @ 07:03

    Hi Hans, the screensaver should be available in the buildingblock you can download in the bottom of the article

Other Links to this Post

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.