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.
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.
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:
SMS chooses the drive with the most space and the highest level of file system security to create the package store. For example, if the D: drive is used for package storage, the package store is: D:\SMSPKG.
Rather than letting SMS choose where to create the package store, specify the drive used from the Software Distribution Properties dialog box. In Figure 4-10, drive E: is selected as the package store drive.
Figure 4-10. The Software Distribution Properties dialog box showing drive E: as the package store drive.
This dialog box is accessed from the Component Configuration node. In Exercise 20, you configured the Windows NT Client Software Installation account from the Software Distribution Properties dialog box.
Distribution points can be located on Windows NT/2000 or NetWare 3.x/4.x file servers. The distribution point is either a common package share or a custom share. These share types were explored in Lesson 2.
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.
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.
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:
There are three types of lookup files: system (sitecodeSYSTM.LKP), user (sitecodeUSER.LKP), and user group (sitecodeUSRGP.LKP). Lookup files are differentiated by file name and collection membership types. A system lookup file lists the GUID of each client computer that is a member of the targeted collection. A user lookup file lists the domain user name of each domain user that is a member of the targeted collection. The user group lookup file lists each global group that is a part of the targeted collection. Every member of the global group receives notification of an advertisement through the global group lookup file.
For each advertisement, the Offer Manager creates these three files in the \smsdir\INBOXES\OFFERINF.BOX directory. The Inbox Manager then copies the files to the \CAP_sitecode\OFFERINF.BOX directory on each CAP.
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.
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.
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.
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).
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"
In this exercise, you will run the Kolumz program you advertised to the Windows NT Workstation in Exercise 23.
Control Panel appears.
The Advertised Programs Wizard window appears.
The Advertised Programs Wizard window, titled Select Programs to Run, appears.
The properties screen appears. You configured these properties when you created the manual installation program.
The Advertised Programs Wizard window, titled Select Programs to Run, appears.
The Advertised Programs Wizard window, titled Run Programs Now or Later, appears.
The Advertised Programs Wizard window, titled Completing the Advertised Programs Wizard, appears.
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.
Icons will be created for the application when it is installed in Exercise 28.
All advertisements that have been created appear in the details pane.
The Confirm Delete message box appears.
The SMS Administrator console appears.
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.
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.
The Advertisements with status information appear.
Status information about the advertisement appears in the details pane.
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.