Click to return to the Content     
Packaging Components for ...     Publishing Application Up...     Internet Component Downlo...    
Web Workshop  |  Content & Component Delivery

How to Automatically Update an ActiveX Control


Software Update Channels enable users to receive automatic updates of ActiveX® Controls. All a user must do is download an ActiveX control from your site and subscribe to your Software Update Channel. When you release new versions of your ActiveX control, subscribed users visiting a site that uses the new version can choose to receive the update automatically. The new version can be installed immediately, or precached for offline installation later.

Requirements

This article applies to ActiveX Controls, not applications or Java applets. For information about updating applications, see Publishing Application Updates on the Web.

Support for Software Update Channels and Channel Definition Format (CDF) files began with Internet Explorer 4.0.

Implementation Steps

To enable users to automatically install updated versions of ActiveX Controls, perform the following tasks:

  1. Create an \osd\GenericSample share off the root directory of your Web server. If you are using the Personal Web Server on your local computer, create a directory (\osd) under the \Webshare\Wwwroot directory and then create a subdirectory (\GenericSample) under the \osd directory.
  2. Copy the contents of the Open Software Description sample into your share.
  3. Update the HREF attribute of the CHANNEL element in Circ3_orig.cdf, Circ3_adv.cdf, and Circ3_pc.cdf by replacing <your server> with the name of your server.
  4. Copy the updated version of Circ3_orig.cdf as Circ3.cdf into your share.
  5. Open Internet Explorer 4.0 or later and browse to Circ3.htm. This will install the first version of the Circle ActiveX control (build 1).
  6. Subscribe to Circ3.cdf by clicking the addchannel.gif (1685 bytes) link.

Distributing a New Version

Now assume you have a new build, build 2 of your control, ready to roll out. You want all users who have build 1 to automatically update to build 2 as soon as they hit any page that uses the Circle control.

Note This can also be used for a new version, but the control used in this example had only two builds of the same version available.

  1. Copy Circ3_pc.cdf on top of Circ3.cdf. (You can use Circ3_adv.cdf instead of Circ3_pc.cdf if you don't want to automatically preload the user's cache with the new build. Precache does not mean autoinstall; Microsoft Internet Explorer just caches the new build so the user can later install the control faster and even while offline). The new CDF file advertises build 2 of the Circle control.
  2. Note To run this demonstration again, you must copy Circ3_orig.cdf back on top of Circ3.cdf. You will also have to copy Circ3_v1.cab on top of Circ3.cab.

  3. Copy Circ3_v2.cab on top of Circ3.cab. This is exactly the same as the real-life situation where the user sees only Circ3.cab but you have Circ3_v1.cab (version 1) and Circ3_v2.cab (version 2). When you update to version 2, you don't want version 1 to be available anymore, so you copy Circ3_v2.cab over Circ3.cab, the external distribution cabinet file.
  4. On the client computer, first make sure that the zone you are in is set for Custom. Under ActiveX Controls And Plugins/Download Unsigned ActiveX Controls, select Enable. Note that this is needed only for the demonstration file because the cabinet files are not signed; if they were signed, this would not be needed. Then select Favorites/Update All Subscriptions, or right-click the Circle channel (under Favorites/Software Updates) and select Update Now. Note that if the CDF file had defined an automatic schedule, this update would have happened automatically like any other subscription in Internet Explorer.
  5. The Circle channel icon will gleam (red gleam on the upper-left corner of the icon). If you set up the e-mail notification during subscription, you will receive e-mail notifying you of the updated software. When you click the Circle channel, Internet Explorer will navigate to the home page of the channel. This page has instructions on how to download/install the new version of Circle (in this case just a link to an HTML page with the OBJECT element for the new version of Circle).
  6. Alternately, if you return to view Circ3.htm (or any page that uses build 1 of the Circle ActiveX control), the client will be automatically upgraded to version 2 because Internet Explorer knows that build 2 is available. In this simple example, note that the only way to see the version difference between the two Circle controls is to view the properties on the Circle control in the Downloaded Program Files directory.

Related Topics

The following lists contain links to topics related to publishing updates to applications on the Web.

Overviews

References



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.