How Internet Component Download Works

See Also

In Internet component download, you first package the components you want to download into a .cab file so that the browser can download them intelligently. The Package and Deployment Wizard's packaging process builds an HTML page that refers to this cabinet file through an OBJECT tag. When a user opens this Web page, the browser reads the OBJECT tag and retrieves the necessary files for the download.

As part of the .cab file creation process, the Package and Deployment Wizard creates an .inf file that contains information about the download. You can customize this file if you need to include additional information.

Note   If you update the .inf file, you must rebuild your .cab file.

For More Information   See "Packaging Files for the Package and Deployment Wizard" in this chapter for a full list of the files created with the .cab file.

The OBJECT Tag

The following HTML fragment shows the OBJECT tag for a .cab file called MyContrl.cab:

<OBJECT
   CLASSID="clsid:25BDF09D-EC8B-11CF-BD97-00AA00575603"
   CODEBASE="/Controls/MyContrl.cab#version=1,0,0,0"
   ID=MyContrl>
</OBJECT>

The OBJECT tag shown above contains three attributes:

The Download Process

The system performs the following actions when downloading a .cab file's contents onto a client machine:

  1. The browser checks the registry for the class ID in the OBJECT tag. If it fails to find it, it processes the CODEBASE attribute. If the browser does find the class ID, it checks the file referenced in the registry entry to see if it is current and proceeds with the download if it is not.

  2. The browser downloads and unpacks the appropriate .cab file.

  3. The browser processes the .inf file associated with the .cab file.

  4. Internet Explorer makes registry settings, including those related to the component's status as safe for scripting or safe for initializing, if appropriate.

  5. The browser checks to see whether you have any necessary files or components already installed. If you do, it checks to see whether the files or components are current. If they are current, the browser makes no changes to them. If they are not current, the browser replaces them with a new copy that it downloads and extracts.

  6. The browser installs and registers your component.

Checklist for Component Download

The following checklist shows the steps that you should follow to create a fully signed, safe Internet component download for an ActiveX control.

Note   If you are creating a download for another type of ActiveX component, you would not perform the steps involving safety settings.

  1. Design the software, specifying the intended software safety level.

  2. Create the software and test. If you are using the IObjectSafety interface, implement the appropriate safety settings on your objects.

  3. Create a document showing the object is safe.

  4. Get an independent review.

  5. Recreate the .cab using the Package and Deployment Wizard, and set the appropriate safety flags if you did not use the IObjectSafety interface.

  6. Modify the .inf file as required to add readme information and other files.

  7. If you modified the .inf in step 6, recreate the .cab file using Makecab.exe.

  8. Digitally sign the .cab file.

  9. Test the final .cab file with each platform on which it may run.

Resources for Component Download

The following resources may be needed to create and test your packages for Internet component download. Most of the resources are part of Visual Basic.

Resource Purpose Source
pdaddin.dll or
pdcmdln.exe
Package your components for download using the Package and Deployment Wizard, either from within Visual Basic (pdaddin.dll) or as a stand-alone executable (pdcmdln.exe). Visual Basic installation
lpk_tool.exe Create the license for any controls. Visual Basic Tools directory
makecab.exe Build cabinet files. Visual Basic installation
signcode.exe Manage digital signatures ActiveX SDK
Authenticode certificate Identify the developer Verisign Inc., GTE, or another vendor that provides signatures
Internet Explorer Test download and installation www.microsoft.com
regsvr32.exe Register and unregister software for testing Visual Basic Tools directory