Creating Installation Scripts

[Previous] [Next]

To begin the process of creating an installation script, start SMS Installer to launch the Installation Expert window, as shown in Figure 13-7.

click to view at full size.

Figure 13-7. The Installation Expert window.

We'll begin the process of creating an SMS Installer-generated executable by running the Repackage Installation Wizard. In this example, we'll create the Microsoft Office 97 installation executable.

CAUTION
The setup routines of some of the newer Microsoft applications, such as Microsoft Office 2000, use the Microsoft Windows Installer Service to perform product installation. Using SMS Installer to repackage applications that use the Microsoft Windows Installer Service is not recommended because you must use the setup options bundled with these applications to install these applications.

To create the Office 97 installation executable, follow these steps:

  1. In the Installation Expert window, click the Repackage button to launch the Repackage Installation Wizard, shown in Figure 13-8.
  2. On the Repackage Installation Wizard screen, you configure the name and path of the setup program used by the application for installation. You may also need to add any other command-line arguments that might be needed by the setup program.
  3. In the Directory list, configure any directories you want to be included in the list of directories to be scanned during the installation process. For this example, we'll be installing to drive D, so we need to add this drive to our list. To add a drive, click the Change button to open the Repackage Advanced Settings window, shown in Figure 13-9.
  4. click to view at full size.

    Figure 13-8. The Repackage Installation Wizard screen.

    click to view at full size.

    Figure 13-9. The Repackage Advanced Settings window.

  5. In the Directories To Scan section of the Files/Directories tab, click Add to display the Select Directory dialog box, shown in Figure 13-10.
  6. Figure 13-10. The Select Directory dialog box.

  7. In the Select Directory dialog box, we can select the root directory D or we can select only the specific subdirectories we want to scan. Narrowing the scan can save significant time during the repackaging process. As a general rule, you do not want to scan every directory if you know some directories will not be affected during the installation. For our example, since our reference computer has little installed on drive D, we can add the root of this partition to our list.
  8. When you have added all the directories you want to scan, click OK. The directories are added to the Directory list.
  9. Next we will configure the directories and files we want to ignore during the scan process. Again, being selective here can improve the performance of the installation process. In the Files To Ignore section of the Files/Directories tab, click Add to display the Open dialog box, as shown in Figure 13-11.
  10. For this example, the D:\junk directory will not contain any files pertaining to our installation of Office 97, so we can ignore this entire directory. Select the D:\junk directory by double-clicking on it, and then enter *.* in the File Name text box to include all files in this directory.
  11. Click Open to add the directory to the File Name list, as shown in Figure 13-12.
  12. click to view at full size.

    Figure 13-11. The Open dialog box.

    click to view at full size.

    Figure 13-12. The modified File Name list.

  13. You can also specify whether to ignore scanning of any temporary files during the installation process. To scan temporary files, check the Scan Temp Files check box.
  14. To specify the registry keys and values to scan or ignore during the installation process, click on the Registry Keys tab, shown in Figure 13-13.
  15. click to view at full size.

    Figure 13-13. The Registry Keys tab.

CAUTION
Selecting registry keys to scan or ignore can be a tricky business. Be especially careful not to overlook or choose to ignore a key that is altered during the setup process—doing so would invariably render your installation script worthless. On the other hand, the installation can change something such as a DHCP address setting by releasing and renewing an IP setting during a system restart, which is unrelated to the installation itself and should not be included in the installation script. Your best bet is to get to know the keys that your installation will affect, and once you have created the final script, test, test, test!

  1. The Registry Keys tab contains four panes. The top two panes represent the current registry settings read from the reference computer. The lower two panes represent the registry settings that are to be ignored. In the top left pane, under My Computer, select the registry trees or values you want to ignore. To add the registry subtree to the list of subtrees to ignore, click Add Tree. To add a key you want to ignore, select the key in the upper right pane, and then click Add Value. The lower left pane shows where the selected keys are located on the reference computer; the lower right pane lists their values. Check the Find Changes In Hardware Registry Entries check box to have the repackaging process ignore any changes made in the hardware registry.
  2. Click OK to return to the Repackage Installation Wizard screen, shown in Figure 13-14, and then click Next to begin the scanning and installation process of our application.
  3. click to view at full size.

    Figure 13-14. The Repackage Installation screen showing the scanning process.

    During the installation phase, the Repackage Installation Wizard will run Setup.exe. With switches provided in the initial configuration of the wizard, the setup will run exactly as it normally does. Remember that you are providing the installation options that will be used during the actual setup of the application on the target computers.

  4. After the Repackage Installation Wizard has completed the setup of the application, click Next to rescan the directories and registry settings, as shown in Figure 13-15. The wizard will compare the system image before and after the installation of the software.

NOTE
You might also want to add application setups during this repackaging process—for example, you might want to distribute several applications within one silent install process. To accomplish this, click the Run Setup button to run the next setup and add the additional software. Keep in mind the size of these packages as we begin to install larger, more complex applications or multiple applications in a single SMS Installer-generated executable.

    click to view at full size.

    Figure 13-15. The Repackage Installation screen showing the rescanning process.

  1. When the rescan of the directories and registry keys is complete, click Finish to complete the repackaging process.

At this point, clicking Compile in the Installation Expert window will generate a basic script that, while not elegant, may certainly be adequate for distribution. You could use the Installation Expert to verify the installation configuration that was created during the repackaging process and then modify and customize the script to meet the particular needs of your users and organization.

CAUTION
If the setup routine for the application you are repackaging requires a system restart, SMS Installer will not automatically restart the repackaging process. You will need to restart SMS Installer and the repackaging process and then continue repackaging.



Microsoft Systems Management Server 2.0 Administrator's Companion
Microsoft Systems Management Server 2.0 Administrators Companion (IT-Administrators Companion)
ISBN: 0735608342
EAN: 2147483647
Year: 1999
Pages: 167

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net