Contents Index Topic Contents | ||
Previous Topic: Open Software Description Overview Next Topic: Automatically Updating ActiveX Controls |
Publishing Applications to the Internet Using OSD
This article describes how to use Microsoft® Internet Explorer 4.01 support for the Channel Definition Format (CDF) and Open Software Description (OSD) to publish applications to the Internet.
This article describes how to:
- Prepare the application so it can utilize this functionally.
- Create a software update channel (described by a CDF file), which your users will subscribe to in order to receive updates.
- Utilize the OSD vocabulary inside the CDF file to describe new versions of your software.
Notes and Requirements
- This document applies to applications, not ActiveX Controls or Java applets. For more information about updating an ActiveX control, see the Automatically Updating ActiveX Controls Using Software Update Channels article. For more information about Java applets, see the Extending Internet Component Download Using OSD article.
- 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 two tasks:
- Modifying the registry during setup to allow Internet Explorer to maintain the users' security settings and update their subscription to your channel.
- Modifying the shortcut to enable update notifications to be displayed to users when they use that shortcut to access your application. This step is necessary only if you want the software update dialog box to appear when using the shortcut to the application when an update is available.
Modifying the Registry to Maintain the User's Security Settings
Because your users are receiving updates through the Internet, Internet Explorer respects the URL Security Zone setting you 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 (see below) Low All software update functions available 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 update 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 is 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 to work.
Note Microsoft Installer (MSI) technology, which will be released in the near future, 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>, and Path is the path to the program (the normal target of the shortcut).
- "Bless" your shortcut after it is created using the Blesslnk tool provided by Microsoft in the \bin directory of the Internet Client SDK 4.01 refresh package. After placing your shortcut on the user's computer, you must run the following command:
Blesslnk -l AppName FullPathwhere AppName 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 4.01 is extremely easy. Simply use the following example, replacing the information with your own by following the simple steps below.
<?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:
- Replace CHANNEL HREF to point to a URL that you want users to be sent to when they first subscribe to the channel and when they click the channel in the future.
- Change the TITLE to your own. This will show up in the Internet Explorer Favorites/Software Updates folder. This is usually your software's title plus the words "Update Channel".
- The LOGO is shown next to the TITLE 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.
- Replace SOFTPKG HREF to point to a URL that you want users to be sent 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 as used for the CHANNEL HREF.
- Change the NAME to either 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.
- Change the VERSION number to your own. The version "a,b,c,d" is a.b.d.
- Change the PRECACHE 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; it will simply make it available offline on the user's computer if you leave PRECACHE on).
- Change the TITLE to reflect your software's name. This will be shown in the update dialog box when the user is notified of an update.
- Change the ABSTRACT to give the user a description of the software. This will also be shown in the update dialog box.
- Change the CODEBASE to point to the URL of your software. This can point to a CAB or an EXE file. This does not point to an HTML page.
When you are done with these easy steps, put the CDF file on your Web server and request your users to subscribe to this channel when they come to your page. Your text can say, "Click here to subscribe to a channel to receive notifications of future updates of this software. You will remain anonymous, and we will not give out your name and address."
Handling Updates
In the future, when the new version is available, you will need to change the CDF file on your Web server. On the next subscription update on your users' computers, they will get the new CDF. Make the following modifications:
- Change the VERSION number to a larger number.
- Either overwrite the old CAB, EXE, or other file pointed to by the CODEBASE element with the new file, or change the CODEBASE to point to the new file.
- Replace the SOFTPKG HREF to point to the URL that you want the user to be sent to in order to read about the features and installation instructions of the new software.
After the next subscription update, the users can be notified of the new software in two ways:
- If the shortcut to the application was modified, an update box (like the one below) will appear when they execute the shortcut to the application.
Note that this requires the user to be running Internet Explorer 4.01 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 your channel like the one shown here on the Circle Control channel.
When the user clicks the gleaming channel, he or she will be taken to the page described by the <SOFTPKG HREF=http://testserver/your_update_page.htm> tag to read about the update. This page is also the page used to set up the program.
You can use this example with your own software update channel to get up and running very quickly.
For additional information about the OSD vocabulary, see the specification at http://www.microsoft.com/standards/osd. For additional information on CDF, see the specification at http://www.microsoft.com/standards/cdf-f.htm.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.