How to Automatically Update an ActiveX ControlHow to Automatically Update an ActiveX Control*
*Contents  *Index  *Topic Contents
*Previous Topic: Automatically Updating ActiveX Controls
*Next Topic: Setting Language Dependency Using OSD

How to Automatically Update an ActiveX Control

  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 \samples\osd\GenericSample directory of the Internet Client SDK refresh package into the 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 actual server.
  4. Copy the updated version of circ3_orig.cdf as circ3.cdf in the same share.
  5. Open Microsoft® Internet Explorer 4.01 or later and browse to circ3.htm (which will install the Circle ActiveX™ Control version 1).
  6. Subscribe to circ3.cdf by clicking the addchannel.gif (1685 bytes) link.

Now assume you have a new build, build 2, of Circle ready to roll out. You want to automatically upgrade all build 1 users 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. (Alternatively, use circ3_adv.cdf instead of circ3_pc.cdf if you don't want to automatically preload the user's cache with the bits. Preload does not mean autoinstall; Microsoft Internet Explorer just caches the new bits so the user can later install the control faster and even while offline). The new CDF advertises version 2 of the Circle control.

    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.

  2. Copy circ3_v2.cab on top of circ3.cab. This is exactly the same as the real-life situation where the external world 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 available anymore, so you copy circ3_v2.cab over circ3.cab, the external distribution cabinet file.
  3. 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 CABs 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 had set an automatic schedule, this update would have happened automatically like any other subscription in Internet Explorer.
  4. The Circle channel icon will gleam (red gleam on upper-left corner of the icon). If you set up the e-mail notification during subscription, you will receive an e-mail notifying you of the updated software. When the user clicks 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).
  5. Alternately, if you return to view circ3.htm (or any page that uses the Circle ActiveX Control version 1), the client will be automatically upgraded to version 2 because Internet Explorer knows that version 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.

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.