About Distribution Units
Note Open Software Description (OSD) and Channel Definition Format (CDF) are obsolete as of Windows Internet Explorer 7 and should not be used.
Internet software distribution units are packages consisting of a cabinet file (.cab) that contains an INF file and/or an OSD file, with or without a software component. One or more distribution units may be needed to distribute a single software component.
You, the software provider or Web master, can create distribution units that, when placed on your Web server, enable the Windows Internet Explorer Internet Component Download services to pull down and install software on users' computers.
- Key Terms and Concepts
- Benefits
- Sample Uses
- How It's Done
- How the Cabinet File is Processed
- Related topics
Key Terms and Concepts
It may be useful to familiarize yourself with the individual parts that make up a distribution unit. In addition to your software component—such as a Microsoft ActiveX control (.ocx), a .dll, an .exe, a Java class file, or an applet—Internet Component Download distribution units consist of the following:
Cabinet file (.cab)
Cabinet files are containers for compressed files. They've been used for years to compress software distributed on disks.
Cabinet files used in the context of Internet Component Download services always contain an OSD file and/or an INF file. A cabinet file may or may not also contain a software component and/or a catalog file.
Microsoft supplies the Cabinet Software Development Kit containing tools a developer can use to build cabinet files.
Catalog File
Catalog files specify that a given set of files belongs to the same logical group of files. Catalog files, supported by Internet Explorer version 5 and later, are used to avoid multiple trust dialog boxes when users download software components.
For more information about catalog files, see Using Catalog Files.
Digital Signature
Cabinet files can (and should) be digitally signed. A digital signature provides accountability for software developers by associating a software vendor's name with a given file.
Information File (.inf)
INF files provide installation instructions. Microsoft Internet Explorer 3.0 and later uses INF files to install and register software components downloaded from the Internet.
For more information about INF files, see Using INF Files.
OSD
OSD is an XML vocabulary used to describe software components and their relationships to other components.
For more information about OSD files, see Open Software Description Overview.
Benefits
Each of a distribution unit's parts has its own set of advantages. The parts can be combined to provide enhanced functionality within a given problem domain.
- Cabinet files are composed of multiple files compressed into one. File compression has four significant benefits:
- Reduces download time.
- Ensures that all of the files needed to install and run your component are present.
- Prevents partial installation.
- Allows installation from several sources, such as a personal computer or Web site.
- Signed cabinet files, as previously mentioned, provide accountability for Internet software providers.
- INF files provide a way to register downloadable components and handle limited software dependencies.
- OSD files can describe complex software, language, and platform dependencies. This functionality ensures that only the components actually needed by the user's computer will be downloaded.
Sample Uses
The following configurations are possible for Internet software distribution units:
- Cabinet file containing an INF file
- Cabinet file containing an OSD file
- Cabinet file containing an INF file and an OSD file
- Cabinet file containing an INF file and a code component
- Cabinet file containing an OSD file and a code component
- Cabinet file containing an INF file, an OSD file, and a code component
Each distribution unit configuration has advantages for particular uses and can be combined with one or more of the other configurations for enhanced functionality within a given problem domain. Any one of the above configurations within a given software distribution may also contain a catalog file.
How It's Done
This section presents a generalized list of tasks required for creating a distribution unit for Internet Component Download.
Create the software component.
Determine the files you need to distribute with the component (dependencies).
Choose a method for packaging and distributing your component.
Create the INF and/or OSD files. These are the instructions that Internet Explorer will use to find and install the component and its dependencies.
Build the cabinet file or files. Remember to leave space in the cabinet file(s) for your digital signature.
Sign the cabinet files. If your software distribution consists of multiple distribution units, each cabinet file should be signed. Include a signed catalog file to enable users with Internet Explorer version 5 and later to avoid multiple certificates.
Reference the first distribution unit using the CODEBASE attribute of an object element on a Web page to specify the URL of the cabinet file. The following excerpt from a sample HTML file demonstrates how the object element and CODEBASE attribute are used to access an ActiveX control packaged in a cabinet file.
<OBJECT CLASSID="clsid:dcf0768D-ba7a-101a-b57a-0000c0c3ed5f" CODEBASE="http://example.microsoft.com/time.cab#Version=1,0,0,0" ALIGN="CENTER" WIDTH="270" HEIGHT="26" ID="T1"> <PARAM NAME="Interval" VALUE="1000"> <PARAM NAME="Enabled" VALUE="1"> </OBJECT>
Note that #Version can be specified in the CODEBASE attribute of the object element to control updates and limit unnecessary downloads. If #Version is not specified and a version of this component is already installed on the user's computer, no download occurs. If #Version is specified and an earlier version of the component is already installed on the user's computer, the object will be downloaded. If the component specified in the object element is not present on the user's computer, the component will be downloaded whether #Version is specified or not.
How the Cabinet File is Processed
Internet Explorer handles the object object and the CODEBASE attribute in the following manner.
- Internet Explorer parses the object object and searches for the CODEBASE attribute. If the CODEBASE attribute is absent or is preceded by a URL-to-object index server in the CodeBaseSearchPath, this index is used to retrieve the file.
- Internet Explorer locates the cabinet file identified by the CODEBASE attribute.
- Internet Explorer expands the files found in the cabinet file.
- Internet Explorer copies the expanded files to the user's computer. For Windows 95 or later users with Microsoft Internet Explorer 4.0 and later, the download directory is \WINDOWS\Downloaded Program Files. For Microsoft Windows NT 4.0 users with Internet Explorer 4.0 and later, the download directory is \winnt\Downloaded Program Files. The default directory for earlier versions of Internet Explorer is \WINDOWS\occache. Note that the occache directory will exist but not be used on computers upgraded from Internet Explorer 3.0.
- Internet Explorer registers the objects and/or files that require registration.
- Internet Explorer calls the Component Object Model (COM) CoCreateInstance function to create an instance of the specified object.
If both an INF and an OSD file are present and the user's browser (for example, Internet Explorer 4.0) recognizes OSD files, the cabinet file is processed according to the following priorities.
- The parser looks inside the current cabinet file for the OSD file. If found, it is processed. OSD files may also reference the INF file. In this case, both files are processed, but notice that the OSD file is really controlling the process.
- If there is no OSD file present, the parser looks for an INF file to process.
If the user's browser (for example, Internet Explorer 3.0) doesn't recognize OSD files, only the INF file is processed.
Related topics
Conceptual
Introduction to Internet Component Download
Microsoft Internet Component Download Reference