Sometimes you can automatically migrate the existing low risk programs using the PGC Migration Wizard, but at other times you need to create a new client installation script. The Setstart client installation script sets up shortcuts on the desktop or Start menu that run the application from the distribution point where Setstart is found. The wizard uses Setstart to migrate programs. You can use the script to create a new configuration command line or customize it to provide any other client-side modifications you need. You can use these client installation scripts within the manual migration sequence of the wizard, or you can use them to re-create the programs in SMS 2.0.
If your application requires registry changes or other changes on the client, you can edit Setstart.ipf within SMS Installer to add any necessary client modifications that are not already included. Or, you can use any of a variety of packaging and scripting tools to create client and server setup programs for these applications, using the concepts and suggestions described in this chapter.
To open the Setstart client installation script in SMS Installer
Set up SMS Installer on a reference computer if you want to use the script for software distribution.
These steps prepare you to examine the Setstart client installation script, or to modify it to create a custom script for your application. For more information, see Chapter 13, “Creating Self-Extracting Files with SMS Installer,” in the SMS 2.0 Administrator’s Guide.
Whenever you create a server-based application using Setstart.ipf, you need to create it so that these concepts, explained in the following sections, are taken into account:
When a user runs a shared application on a distribution point, you start the application from the client computer, but the application is run from within the package directory on the distribution point.
When you create or modify client installation scripts for an application, be sure the following conditions are met:
The Setstart client installation script points the command lines to the directory on the distribution point where Setstart is found by using the EXEPATH variable. This variable is set to %INST%, which is an internal SMS Installer variable containing a path to the directory that contains the Setstart script that is executing. Setstart takes advantage of the fact that the installed application files are in the same directory as the Setstart script.
The following excerpt from the Setstart client installation script shows how these references are handled for paths from the start menu and paths from program groups:
If CL_GROUP Equals (Ignore Case) "Start" then Set Variable CL_GROUP to %CSTARTMENUDIR% Create Shortcut from %EXEPATH%\%CL_EXE% to %CL_GROUP%\%CL_NAME%.lnkElse Add Icon "%CL_NAME%" to Program Manager Group "%CL_GROUP%" Command: %EXEPATH%\%CL_EXE% %CL_ARGS% Icon %CL_ICON% Dir: %CL_DEFDIR%End Block
If the setup requires a drive letter connection to the distribution point and then references that drive letter in its pointers to the application image, force a persistent drive letter connection to the package on the distribution point. (Applications requiring a specific drive letter connection fail to run if the drive letter is not available or is not connected to a proper server.)
To set the drive letter option
Systems Management Server Site Database (site code - site name) Packages package Programs
This option causes Windows to reconnect the drive at each logon. Be careful to coordinate drive letter mappings with other programs that require a specific drive letter, such as logon scripts.
When you create client programs for software distribution, consider whether you want these programs to remove themselves when you no longer need them. These programs can only remove themselves if you create an uninstall script. Create this script using the SMS Installer or other installation tool, or use a text editor. You must register the uninstall program with the Add/Remove Programs mechanism in the client registry. This task can be done within the client installation script.
When you set up the removal process, make sure that:
Although it is not required, the uninstall command line should usually be unattended and silent.
The SMS Installer (like most installation script tools) automatically creates the necessary registry keys for program removal and also creates the uninstall script. As the Installer setup script such as Setstart executes, it writes each command it performs to a log file. This log file is then used to create the uninstall script (Uninstal.ipf) by undoing all the actions that were done by the installation script. The default uninstall script is stored in the Uninstal.ipf (Uninstal.exe) file.
When you have an uninstall key and an uninstall program, you can set up the removal process in the SMS Administrator console in the Advanced tab of the Program Properties dialog box. Select Remove software when it is no longer advertised and enter the uninstall key in the Uninstall Registry Key textbox. You should perform this step for each SMS software distribution program that you install on clients that should have uninstall support.
User-specific requirements are client-side modifications that must be executed once by each user who logs on to the computer; for example, creating entries under HKEY_LOCAL_USER in the registry, or setting up user-specific Start menu entries or shortcuts on the desktop. System-specific requirements are modifications that need to be executed only once on each client; for example, installing a set of DLLs on the computer or creating entries under HKEY_LOCAL_MACHINE in the registry. When applications are installed on servers but run from clients, some modifications to the clients are user-specific, while others are system-specific.
Each SMS software distribution program can be set to run once for each user or once for each computer.
To set this option
Systems Management Server Site Database (site code - site name) Packages package Programs
You must set up user-specific and system-specific modifications in separate programs, since the When program is assigned setting applies to the entire program. However, you can coordinate the execution of the two programs on clients by setting the user-specific program to have a dependency on the system-specific program.
When the user-specific program is executed on the client, if the system-specific program has not been previously executed on the client, it runs prior to the user-specific program. Each program can be set to run in either the logged-on user’s context or a local administrator context.
Typically, the dependent and depended-upon programs will be in the same package, but you can also create dependencies on programs within other packages. The depended-upon program must be on distribution points available to the client running the dependent program. If you do create dependencies on other packages, ensure that all required packages will be available to the clients. If a depended-upon program cannot be executed, the dependent programs are not executed.
To set up dependent programs for user-specific and system-specific modifications, create a program for user-specific modifications and a second program for system-specific modifications. Then, in the Program Properties dialog box of the dependent program (the user-specific modifications, the one you want to run last), select the Advanced tab and select Run another program first.
Sometimes you need to set up a client installation script to be repeatedly installed when distribution points change or when applications are repaired. In such cases, you must make sure that if the client installation script is repeatedly run, the references to the application image are rewritten to the current distribution point.
For example, by default the client always executes the application from the distribution point. You can set up a recurring assignment for the client installation script itself, such as once per day at logon, to force the client to re-select a distribution point each time the client installation script is executed. Using this method gives the following benefits:
If the client installation script provides suitable behavior when run repeatedly, and the program is assigned (mandatory) to clients, you can specify that the setup program reruns at intervals by setting up a recurring assignment schedule.
A recurring assignment (such as, once per day) can also be combined with an event-driven assignment (such as, at logon) to create a recurring event-driven assignment (such as, run at logon once per day). If more than one logon occurs during the day, the script would only be run once, and if no logon event occurred for several days, the script would wait to run until the next logon event occurred. If you set up a recurring assignment, disable the countdown dialog box on clients.
To disable the countdown dialog box
Systems Management Server Site Database (site code - site name) Site Hierarchy site code - site name Site Settings Client Agents