[Previous] [Next]

Lesson 4: The Software Distribution Process

The previous lessons described the parts of SMS that are involved in software distribution. This lesson examines how processes and threads provide software distribution services.

After this lesson, you will be able to: Estimated Completion Time: 40 minutes

Software Distribution Overview

A package is configured at the site server and made available on distribution points. The package is targeted to client computers through collections. Packages run on client computers using instructions placed on CAPs by advertisements.

Software can be distributed to other sites, even sites using SMS 1.2 site servers.

Package Distribution

Packages containing source files are always sent from the site server to distribution points. A package can be configured to obtain its source files from a location independent of the site server, or it can create a compressed copy of the source files. The compressed file is then stored on the site server before being sent to distribution points. Within a site, the source files are decompressed, if necessary, then copied to the distributions points.

When a package is created in the SMS Administrator console, a package notification database trigger instructs the SQL Monitor process to write a package notification file *.PCN to the \SMS\INBOXES\DISTMGR.BOX directory.

The Distribution Manager thread of the SMS Executive processes the *.PCN file. It then copies source files to distribution points if the package is configured to obtain files directly from a source directory. If the package is to be compressed and stored on the site server, the Distribution Manager must complete the following additional steps:

The package compression and decompression processes in SMS 2.0 are similar to the processes used in SMS 1.2.

The additional processing required to compress, store, and decompress packages is significant, especially for large packages. From the Software Distribution Properties dialog box, specify the upper limit for threads (1 to 7) that should be created for package processing. The higher this number, the faster packages become compressed, stored, and decompressed. A lower number puts less strain on site server computer resources. Whenever possible, configure SMS to obtain files from a source directory. When packages are sent to other sites in the site hierarchy, the package is always compressed.

Program Distribution

When programs are created for a package, program instructions are sent by the Distribution Manager to the CAPs.

Three files are created for each package and placed in or below the \smsdir\INBOXES\PKGINFO.BOX directory:

The Inbox Manager thread of the SMS Executive detects the files in and below \smsdir\INBOXES\PKGINFO.BOX and copies the files in or below the \CAP_sitecode\PKGINFO.BOX\ directory. The entire process of distributing packages to distribution points and program instructions to CAPs does not generate an offer to the client agents. Once an advertisement is created and distributed, an offer is detected by the Advertised Programs Client Agent on the client computer.

Advertisement Distribution

When an advertisement is created in the SMS Administrator console, an offer notification database trigger runs. This trigger instructs the Offer Manager thread of the SMS Executive to verify that the package has been sent to the distribution points and then to create three files for each advertisement. The three files are:

Running Advertisements on Client Computers

The Advertised Programs Client Agent is more than the Advertised Programs Monitor and the Advertised Programs Wizard interfaces. The core component responsible for running and managing advertised programs on the client computer is the Advertised Programs Manager (APM). Using the APM, all client computers running Windows 16-bit and Windows 95/98 operating systems detect and run advertised programs in the context of a logged-on user. Windows NT/2000 client computers run advertised programs either in the context of a logged-on user or in the context of an administrative account, usually the Windows NT Client Software Installation account.

Offers are detected on the CAP by the client computer. On Windows 16-bit client computers, the offer is detected by the Advertised Programs Manager process. Windows 32-bit client computers rely on the Offer Data Provider process for detection. Once the process determines that there is a valid offer in a *.LKP file, it reads the *.INS file and from this information loads the appropriate *.OFR file (Figure 4-11). For a review of the file functions, see the Advertisement Distribution section of this lesson.

Click to view at full size

Figure 4-11. How the Advertised Programs Service or the Offer Data Provider reads new offers.

The APM is sent any new offers and passes the request to the Advertised Programs Wizard, which then displays any programs ready to run. The APM also manages any program scheduling information submitted by the logged-on user and it tracks all advertisements and their execution status (pending or completed). If a program is ready to run, the Advertised Programs Monitor makes the program appear so that the user can run it. A countdown message for mandatory advertisements is also displayed.

The Advertised Programs Manager application uses a number of DLLs to complete the following tasks:

Flow diagrams detailing all files and processes used in the software distribution function are found in Appendix D of the SMS Administrator's Guide.

Software Distribution Status

Status information about packages and advertisements are viewed from the Package Status node of the SMS Administrator console. The Package Status node provides information on the sites where a package has been targeted, the status of the package distribution, whether the distribution points within a site have received the package, the share location, and package ID of the package. Figure 4-12 shows the type of status information collected about a package.

Click to view at full size

Figure 4-12. The Package Status screen in the SMS Administrator console.

The Advertisement Status node provides status information about the target sites for the offer, whether the offer was received, whether it failed, and statistics about the program's operation on the client computers (Figure 4-13).

Click to view at full size

Figure 4-13. The Advertisement Status screen in the SMS Administrator console.

Status node information is conveniently retrieved through predefined database queries. Certain query functions are built into status node items. The interval for displaying status information about an advertisement can be changed. To do so, select an advertisement and from the Action menu, then choose Display Interval. For example, rather than viewing the status of an advertisement from the time that it was created, you can view it after a specific day of the week. Package status information displays error messages, warning messages, information messages, or all status messages. Status messages appear in the Status Message viewer application. This application will be discussed in more detail in Chapter 14, "Monitoring and Troubleshooting SMS"

Exercise 25: Running the Kolumz Program

In this exercise, you will run the Kolumz program you advertised to the Windows NT Workstation in Exercise 23.

  1. Start the Windows NT Workstation. As soon as Computer 2 shows the Begin Logon screen, log on as User1 with a password of PASSWORD. Do not delay the logon process, since the Service Pack installation should not run until later.
  2. If the Advertised Programs Monitor message box appears, click No to close the message box.
  3. From the Start menu, choose Settings, then Control Panel.
  4. Control Panel appears.

  5. Double-click the Advertised Programs application.
  6. The Advertised Programs Wizard window appears.

  7. Read the screen, select the 'Don't show the Welcome Screen in the future' checkbox and then click Next.
  8. The Advertised Programs Wizard window, titled Select Programs to Run, appears.

  9. Select the 'Microsoft Corporation Kolumz 0 - Kolumz Manual Installation' checkbox.
  10. Click Properties to view the properties of the program.
  11. The properties screen appears. You configured these properties when you created the manual installation program.

  12. Click Close.
  13. The Advertised Programs Wizard window, titled Select Programs to Run, appears.

  14. Click Next.
  15. The Advertised Programs Wizard window, titled Run Programs Now or Later, appears.

  16. Click Next.
  17. The Advertised Programs Wizard window, titled Completing the Advertised Programs Wizard, appears.

  18. Click Finish.
  19. The Kolumz installation routine starts. Do not change any of the installation settings. Click Next on all dialog boxes that appear, then click Finish to complete the installation.

  20. To run the program, double-click the KOLUMZ.EXE program under the PROGRAM FILES\KOLUMZ directory on Computer 2.
  21. Icons will be created for the application when it is installed in Exercise 28.

  22. From the SMS Administrator console, select the Advertisement node.
  23. All advertisements that have been created appear in the details pane.

  24. Select the Kolumz advertisement. Then from the Action menu, choose Delete.
  25. The Confirm Delete message box appears.

  26. Click Yes.
  27. The SMS Administrator console appears.

  28. Wait for the Kolumz uninstall routine to start on Computer 2.
  29. When the Kolumz Uninstall window titled Select Uninstall Method appears, click Next to run an automatic uninstall.
  30. At the Kolumz Uninstall window, titled Perform Uninstall, click Finish.
  31. The Kolumz application was uninstalled in preparation for a later exercise. This uninstall routine ran because you configured the program to uninstall when all advertisements for the program are removed.

Exercise 26: Running the Windows NT version 4.0, Service Pack 4 Program

In this exercise, you will allow the SP4 program to run by logging off Computer 2 but leaving it running. The program was configured as mandatory and to run only when a user is not logged on to the Windows NT Workstation.

  1. From the SMS console tree, select the + sign to the left of the Advertisement Status node. This node is below the System Status node.
  2. The Advertisements with status information appear.

  3. Select the SP4 for Windows NT advertisement under the Advertisement Status node.
  4. Status information about the advertisement appears in the details pane.

  5. Verify that the Received value for the Primary site is 1.
  6. Log off Computer 2, but do not shut it down.
  7. Disk activity should increase on Computer 2 as Service Pack 4 is installed. Wait for disk activity to subside on Computer 2, then continually check the advertisement status in the SMS Administrator console until the Program Success value is 1.

  8. To refresh status information in the SMS Administrator console, make sure that the SP4 for Windows NT advertisement is selected in the SMS console tree and press F5.