Udostępnij za pośrednictwem


Choosing a Packaging and Distribution Method

Windows Internet Explorer version 3.0 and later provides Internet Component Download services that enable users to download and install software components from the Internet and intranets. You, the software provider or Web master, can "package" components and place them on your Web servers for download.

There are four primary methods of packaging and distributing your components to use Microsoft Internet Component Download (MSICD). Some methods can be combined with others to provide enhanced functionality. The method you choose depends upon such things as the browser versions you wish to support, the type of code component you wish to distribute, the international languages your code is distributed in, and the platforms your code runs on.

The purpose of this topic is to help you decide on the appropriate combination of distribution methods for your particular MSICD task. The topic begins by listing the primary options and discussing the relative merits of each. The next section considers the packaging and distribution decision from a problem-based perspective. Links to additional relevant topics are provided throughout.

Security Warning: Assuring users that your downloadable components are reliable is particularly important. For more information on safety, please refer to the Other Considerations section in Introduction to Internet Component Download.

  • Options
  • Selection Criteria
  • Summary
  • Related topics

Options

This section lists the methods for distributing downloadable code components and explores the reasons for choosing one method over another.

  • Executable File

    The single executable (such as an .ocx, a .dll, or an .exe file) is downloaded, installed, and registered in one step.

    Stand-alone executables:

    • Are compatible with Microsoft Internet Explorer 3.0 and later.
    • Do not work for Java classes or applets.
    • Do not use file compression, so they take longer to download.
    • Cannot handle international language or platform requirements.

    Note that these limitations do not apply to complex setup or installation executables. It is true that with enough code, you can write an executable file that installs a Java applet on a machine running Internet Explorer 3.0 or handles software dependencies.

  • Stand-Alone INF File

    By pointing to the URLs of files to download, an information file (.inf) provides instructions that Internet Explorer uses to install your software. The INF file specifies the files that need to be downloaded and set up for the component to run. The INF file can also exist in a cabinet file with or without an OSD file.

    Stand-alone INF files:

    • Are compatible with Internet Explorer 3.0 and later.
    • Do not work for Java classes or applets.
    • Do not use file compression, so they take longer to download.
    • Can handle limited platform requirements and software dependencies.
    • Cannot be signed, so they won't work with default security settings. You can, however, package an INF file in a cabinet file and sign the cabinet file.

    For more information about INF files, see Using INF Files.

  • Stand-Alone Open Software Description (OSD) File

    The Open Software Description (OSD) vocabulary is supported by Microsoft Internet Explorer 4.0 and later. A stand-alone OSD file presents the same security/trust issue as a stand-alone .inf file. Internet Explorer will decline trust in the default browser security modes. The solution is packaging the OSD file in a cabinet file and signing the cabinet file. OSD works with Java class files and applets and can be used to specify such things as software dependencies and international language requirements.

    For more information about OSD files, see the Introduction to Open Software Description.

  • Distribution Unit

    Distribution units contain one or more files, all of which are downloaded together in a compressed cabinet file. You can think of distribution units as containers for components and instruction files. Cabinet files must contain an INF file, an OSD file, or both. Cabinet files usually also contain a program file. The INF and OSD files can refer to files in the cabinet file as well as to files at other URLs.

    The advantages to distribution units include file compression for faster downloads and the ability to specify software dependencies, hardware platform, operating system and international language requirements. Cabinet files can be signed.

    For more information about distribution units, see the About Distribution Units.

Selection Criteria

This section considers the packaging and distribution decision from a problem-based perspective. The method you choose for distributing your code component will depend upon such things as the browser versions you wish to support, the type of code component you wish to distribute, the number of languages your code will be distributed in, and the number of platforms your code will run on.

  1. What is the earliest version of Internet Explorer you need to support?

    Newer versions, of course, mean more code distribution options. OSD support began with Internet Explorer 3.0. Support for catalog files began with Microsoft Internet Explorer 5. The following table summarizes the methods available to users with different versions of Internet Explorer.

    Code Distribution Method Internet Explorer Version
    3.0 4.0 5
    Stand-alone .exe Yes Yes Yes
    Stand-alone .inf file Yes Yes Yes
    Stand-alone OSD file No Yes Yes
    .cab file with .inf file Yes Yes Yes
    .cab file with OSD file No Yes Yes
    .cab file with .inf and OSD files Yes* Yes Yes
    .cab file with catalog file No No Yes
      \* OSD files are ignored by Internet Explorer 3.0.
    1. Are any of your components dependent on other components?

      Often your software will require other software to work properly. If you are distributing your software using a distribution unit, your INF file and/or OSD file can be used to define software dependencies. Dependencies cannot be specified with a stand-alone executable file. A stand-alone INF file or OSD file will work, but then you have the signing/security issue to consider. If none of your users have Internet Explorer 4.0 or later, you'll need to specify dependencies in your INF file because their browsers won't recognize OSD files.

    2. Is your software available in more than one international language?

      If your software is available in English and Japanese, for example, an INF file or cabinet file with an INF file are not appropriate distribution methods. A stand-alone OSD file will work, or better yet, a cabinet file with an OSD file. The OSD vocabulary is supported by Internet Explorer 4.0 and later.

    3. Can your software be used across multiple platforms?

      If so, one stand-alone executable will not work for you. OSD is the most flexible way of specifying platform requirements, including operating systems.

    4. Will your software be signed?

      If you are distributing your component using an .exe or cabinet file over the Internet, you'll definitely want to sign it. For more information on signing components, see:

    5. Do you want to register your software component?

      Stand-alone OSD files cannot make registry entries. You will either have to use a stand-alone executable or a cabinet file with an INF file (with or without an OSD file).

    6. Should you package a Java applet?

      There are two very good reasons for packaging a Java applet. The first reason is to enable offline browsing of your site. Users who have your pages saved on their hard drives can browse at their leisure, frequently and efficiently. The second reason for packaging Java applets is to avoid repetitive downloads. Frequent visitors to your Web sites are downloading your applets repeatedly, wasting bandwidth and server time. The preferred way to distribute Java components is in a cabinet file with an OSD file. Java distributors must package all classes and applets that run outside the Java sandbox.

    Summary

    The following table summarizes the Internet Component Download packaging and distribution options, as well as the criteria for choosing an option for a particular distribution task.

    Decision Criteria Options
    Stand-alone .cab file with
    .exe .inf OSD .inf OSD .inf & OSD
    Can make registry entries Yes Yes No Yes No Yes
    Can be signed Yes No No Yes Yes Yes
    Can specify language dependencies No No Yes No Yes Yes
    Can specify software dependencies No Limited Yes Limited Yes Yes
    Compresses files for faster download No No No Yes Yes Yes
    Works with Java No No Yes No Yes Yes

     

    Conceptual

    Introduction to Internet Component Download

    Introduction to Software Update Channels

    Using INF Files

    About OSD File Architecture

    Microsoft Internet Component Download Reference

    Open Software Description Element Reference

    About URL Monikers