Using File Attributes to Create Complex Rules

In the preceding examples, the rules used only the filename to identify packages. In order to identify files more certainly, you can specify additional file attributes in the package rule. These attributes were described earlier in this chapter. The allowable file attributes are:

The following example uses the AND operator to detect a package if all three files (WINWOOD.EXE, WINWOOD.INI, and DIALOG.FON) are found on the client. It also requires that the WINWOOD.EXE file must have a filesize of 3483136 bytes, that the value of BYTE 10000 is 114, and that the CHECKSUM of the file (from byte 5000 to byte 5100) is 6851.


FILE winwood.exe  SIZE 3483136 BYTE 10000 114 CHECKSUM 5000 100 6851
AND
FILE winwood.ini
AND
FILE dialog.fon

Although this example includes only three files, and specifies file attributes for only one of the files, you can create rules which include many more files, and you can specify file attributes for all files in the package rule. For more package rule examples, look at some of the PDFs supplied with SMS version 1.2 (you can import the PDFs in the Packages window of the SMS Administrator). For more information about PDFs, see the following section.