Partager via


Publishing Application Updates on the Web

Note  This technology is obsolete as of Windows Internet Explorer 7 and should not be used.

 

This article describes how to publish updates to applications on the Web.

  • Requirements
  • Preparing the Application
    • Modifying the Registry
    • Modifying the Shortcut
  • Creating the Software Update Channel
  • Publishing Updates to the Application
    • The User Experience
  • Related topics

Requirements

This article applies to applications, not Microsoft ActiveX Controls or Java applets. For information about updating ActiveX Controls, see How to Automatically Update an ActiveX Control.

Support for Introduction to Software Update Channels and Channel Definition Format (CDF) files began with Microsoft Internet Explorer 4.0. With Internet Explorer 4.01 and later, users can be notified of updates when they launch an application from its shortcut. For more information about the changes between Internet Explorer 4.0 and Windows Internet Explorer 4.01, see About Version Changes.

Users must have the Enable Scheduled Subscription Updates option set, or they must manually update their subscriptions to allow Internet Explorer 4.01 to check for updates. This option is enabled by default.

Preparing the Application

Before creating a Software Update Channel, the application should be prepared to handle these tasks:

  • Maintain users' security settings and update their subscriptions to your channel. This is done by modifying the registry during application setup.
  • Enable update notifications when the application is launched from its shortcut. This is done by modifying the shortcut itself.

Developers who use the Professional Edition of InstallShield can have their setup script automatically perform the necessary registry and shortcut modifications by using the template script available at InstallShield White Paper.

Modifying the Registry

Because your users are receiving updates through the Internet, Internet Explorer respects the URL Security Zone setting users are in when making the software update. The behavior is as follows:

Security Zone level for your site Software Update Channel behavior
High No software update functions available.
Medium Requires the AuthorizedCDFPrefix.
Low All software update functions available.

 

AuthorizedCDFPrefix

For the medium setting, you must (during your installation routine) set the AuthorizedCDFPrefix key in the registry for your particular AppName (the Microsoft Application Logo 5 name). This authorizes particular URLs to notify the user of updates. The reason for this is security. By entering the URLs that are authorized to provide updates for your software, you prevent rogue sites from publishing false updates.

AuthorizedCDFPrefix is a new key you must create under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<Your App Name> branch of the registry. Any number of new string values can be added to this key, each of which represents a location where Internet Explorer can get software updates. For example, if one of the strings is "http://testserver", any URL beginning with these letters is authorized to publish software updates. If you want to allow any site to publish updates, you can simply use "http:" as the string.

Modifying the Shortcut

In either the installation process for the software or the initial launch of the application, the shortcut to the application must be modified so that the system will be able to notify the user of any updates. This also requires Internet Explorer 4.01 or later.

Note  Microsoft Installer (MSI) automatically generates modified shortcuts.

 

To modify the shortcut, you must do one of following:

  • Call the following Windows function inside your installation code (or on the very first execution of your program) to create the shortcut.

    IShellLink::SetPath(
        ::{9db1186f-40df-11d1-aa8c-00c04fb67863}: AppName :: Path);
    

    In this function, ::{9db1186f-40df-11d1-aa8c-00c04fb67863}: is a special identifier that should be used as listed. AppName is the name of your application in the registry's uninstall branch under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<Your App Name>. Path is the path to the program (the normal target of the shortcut).

  • After creating your application's shortcut and placing your shortcut on the user's computer, you must run the following command.

    Blesslnk -l AppName FullPath
    

    The AppName above is the name of your application in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<Your App Name> branch of the registry, and FullPath is the full directory path to the shortcut.

Creating the Software Update Channel

Creating your own Software Update Channel for Internet Explorer is very easy. Simply use the following example, replacing the information with your own by following the steps after the example.

<?XML version="1.0"?>

<CHANNEL HREF="http://testserver/logo5/logo5.htm">
    <TITLE>Green (MSAppLogo5) Test Channel</TITLE>
    <LOGO HREF="http://testserver/logo5/green.ico" STYLE="icon"/>
    <USAGE VALUE="SoftwareUpdate"/>
    <SOFTPKG HREF="http://testserver/logo5/logo5.htm"
      NAME="{55272F7E-1B37-11D1-8933-00805F8A4D63}"
      VERSION="1,1,0,1"
      STYLE="MSAppLogo5"
      PRECACHE="yes">
        <TITLE>Green</TITLE>
        <ABSTRACT>Abstract: Green v1.1 application installed
          via channel</ABSTRACT>
        <IMPLEMENTATION>
            <CODEBASE HREF="http://testserver/logo5/green-x.exe" />
        </IMPLEMENTATION>
    </SOFTPKG>
</CHANNEL>

Make these changes to customize this example for your own Software Update Channel:

  1. Modify the value of the CHANNEL attribute of the CHANNEL so that it points to a URL that you want to send users to when they first subscribe to, and later click the channel.
  2. Change the TITLE element to your own. This will show up in the Internet Explorer Software Updates folder. This is usually your software's title plus the words "Update Channel."
  3. The LOGO element is shown next to the TITLE element in the Internet Explorer Software Updates folder. Choose your own custom icon, or delete this tag (from <LOGO to />) to use the default satellite dish logo from Internet Explorer.
  4. Modify the value of the SOFTPKG attribute of the SOFTPKG element so that it points to a URL that you want to send users to when an update is available. Initially (before there's a new version), if you don't know where the new information will be posted, you can point this to the same location you used for the CHANNEL attribute of the CHANNEL element.
  5. Change the SOFTPKG of the SOFTPKG element either to a GUID (as shown) representing your software, or to the application's name in the Uninstall branch of the registry (not the friendly name). If you don't know the name, run Regedit and look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall to find the name. It will be listed under the Uninstall branch on the left.
  6. Change the SOFTPKG attribute number of the SOFTPKG element to your own. The version "a,b,c,d" can be represented as a.b.d.
  7. Change the value of the SOFTPKG attribute of the SOFTPKG element to "no" if you do not want Internet Explorer to automatically receive the update at the subscription update time. Either way, Internet Explorer will not install the update. If you leave SOFTPKG on, Internet Explorer will simply make the update available offline on the user's computer.
  8. Change the TITLE to reflect your software's name. This will be shown in the Software Update dialog box when the user is notified of an update.
  9. Change the ABSTRACT to give the user a description of the software. This will also be shown in the Software Update dialog box.
  10. Change the value of the CODEBASE attribute of the CODEBASE element so that it points to the URL of your software distribution unit. This will usually be a cabinet file (.cab) or an .exe file. This should not point to an HTML page.

When you have completed these steps, put the CDF file on your Web server and request that your users subscribe to this channel when they come to your page. Your text can say, "Click here to subscribe to a channel that will notify you when new versions of this software are available."

Publishing Updates to the Application

When new versions are available, modify the CDF file on your Web server. Users will receive the modified CDF file. Make the following modifications.

  1. Change the SOFTPKG number to a later number.
  2. Either overwrite the old .cab, .exe, or other software file pointed to by the CODEBASE element with the new software file, or change the CODEBASE of the CODEBASE element to point to the new software file.
  3. Replace the value of the SOFTPKG attribute of the SOFTPKG element so that it points to the URL that you want to send the user to in order to read about the features of your new software, and to view the installation instructions for the new software.

The User Experience

Once users receive the modified CDF file on their machines, they can be notified of the new software in two ways:

  • If the shortcut to the application was modified, an update box will appear when the user launches the application from its shortcut.

    Note that this requires users to be running Internet Explorer 4.01 or later with the Windows Desktop Update. In addition, it requires a modification to the shortcut to your program.

  • In Internet Explorer, under Software Updates, there will be a "gleam" on the icon representing your channel.

    When users click the gleaming channel icon, they will be taken to the page defined by the SOFTPKG attribute of the SOFTPKG element in your CDF file to read about the update. This page is also the page used to set up the program.

Conceptual

Introduction to Active Channel Technology

Internet Component Download

Introduction to Software Update Channels

CDF Reference