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.
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
- In the Workspace Manager Console, go to Setup | Datastore | Custom Resources
- 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.
- 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.
- Go to Composition | Other | User Registry, and Add a new registry hack.
- 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…
;<PFNAME>Explorer, configure Demo Flash Screensaver</PFNAME>
;<PFDESC>Sets up a customresource based screensaver executable, timeout, security and enables it.</PFDESC>
;<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>
;<PF>Amount of seconds before the screensaver kicks in.</PF>
;<PF>When set to 1 the session/workstation will be locked when the screensaver is disengaged</PF>
;<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.