PDA

View Full Version : HOWTO: Install a Screen Saver


Support
09-27-2002, 02:35 PM
<HTML><HEAD><TITLE>HOWTO: Install a Screen Saver</TITLE></HEAD><BODY><h3>HOWTO: Install a Screen Saver</h3><b>Document ID: IR02012</b><hr>The information in this article applies to:<ul><li>Setup Factory 6.0</li></ul><hr><h3>SUMMARY</h3><p>This article explains how to install a screen saver.</p><h3>DISCUSSION</h3><p>In the base case, installing a screen saver is simply including an .scr (screen saver) file in your installation and setting its destination to %SysDir%. This will ensure that the screen saver will appear in the <i>Display Properties</i> dialog. Using actions we can also set our screen saver to be the active screen saver, and make sure that the screen saver option is turned on.<br><br>The active screen saver is controlled through different methods on Windows 95/98 and Windows NT/2000/XP therefore we will have to determine which category the end user falls into and then perform the specific actions.<br><br>On Windows 95/98 we will have to edit the System.ini file to make our screen saver the active screen saver. Our entry will basically look like this:<br><br><PRE><code>[boot]<br>SCRNSAVE.EXE=%SysDir%\your_filename_here.scr</code></PRE>On Windows NT/2000/XP we will have to edit the "HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE.EXE" registry value's data to: "%SysDir%\your_filename_here.scr".<br><br>Making sure that the screen save is turned on is the same step on all operating systems, the is done by editing the "HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive" registry value's data to: "1". (This is an optional step)<br><br><b>Note</b>: When you set the active screen saver using the registry or System.ini the changes will not take effect until the computer reboots.<br><br><b>Example:</b><br>In this example we will be installing the screen saver "Cutlets.scr" and making it the default screen saver.<br><br>Here is the Setup Factory 6.0 pseudo-code that will accomplish this:<br><br><PRE><code><b>IF</b> (%IsWindows95% OR %IsWindows98%)<br> <b>Modify INI File</b> (Set Value:%WinDir%\System.ini)<br><b>END IF</b><br><br><b>IF</b> (%IsWindowsNT% OR %IsWindows2000% OR %IsWindowsXP%)<br> <b>Modify Registry</b> (Set Value: HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE.EXE)<br><b>END IF</b><br><br><b>Modify Registry</b> (Set Value: HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive)<br><br><b>Assign Value</b> (%NeedsReboot% = TRUE)</code></PRE>Here are those actions in more detail:<br><br>The first <b>Modify INI File</b> Action for Windows 95/98:<br><br><PRE><code><b>INI file Action:</b> Set Value<br><b>Filename</b>: %WinDir%\System.ini<br><b>Section</b>: boot<br><b>Value name</b>: SCRNSAVE.EXE<br><b>Value data</b>: %SysDir%\Cutlets.scr</code></PRE>The first <b>Modify Registry</b> Action for Windows NT/2000/XP:<br><br><PRE><code><b>Registry Action</b>: Set Value<br><b>Main Key</b>: HKEY_CURRENT_USER<br><b>Sub Key</b>: Control Panel\Desktop<br><b>Value name</b>: SCRNSAVE.EXE<br><b>Value type</b>: REG_SZ<br><b>Value data</b>: %SysDir%\Cutlets.scr</code></PRE>The <b>Modify Registry</b> Action for all operating systems that will make sure the screen saver is active:<br><br><PRE><code><b>Registry Action</b>: Set Value<br><b>Main Key</b>: HKEY_CURRENT_USER<br><b>Sub Key</b>: Control Panel\Desktop<br><b>Value name</b>: ScreenSaveActive<br><b>Value type</b>: REG_SZ<br><b>Value data</b>: 1</code></PRE>The <b>Assign Value</b> action to schedule a reboot:<PRE><code><b>Variable name</b>: %NeedsReboot%<br><b>Value</b>: TRUE</code></PRE><b>Important Notes</b>: None of the above changes will become active until the user has rebooted their system. %NeedsReboot% simply displays the <b>Needs Reboot</b> screen and lets the user decide if they would like to reboot. Set %DoReboot% to TRUE to force a reboot.<br></p><h3>MORE INFORMATION</h3><p>For more information please see the following topics in the Setup Factory 6.0 Help:<br><br><li><b>Command Reference | Variables | Built-in Variables</b></li><li><b>Command Reference | Actions | Individual Actions | Modify INI File</b></li><li><b>Command Reference | Actions | Individual Actions | Modify Registry</b></li><li><b>Command Reference | Actions | Individual Actions | END IF</b></li><li><b>Command Reference | Actions | Individual Actions | IF</b></li><li><b>Command Reference | Actions | Individual Actions | Assign Value</b></li></p><p>KEYWORDS: Setup Factory, Screen Saver</p><hr><FONT SIZE=1>Last reviewed: October 8, 2002<br>Copyright © 2002 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br></FONT></BODY></HTML>