Internet Explorer add-on (IE6, IE7, IE8):
Web-based deployment for IE extensions

Add-in Express™
for Internet Explorer® and Microsoft® .net

Add-in Express Home > Add-in Express for Internet Explorer > Online Guide > Web-based deployment for IE add-ons

Web-based deployment and update

How to develop IE add-ons - Flash video

Add-in Express provides support for web-based deployment and update of IE extensions. Unlike ClickOnce, it allows the user to have administrative as well as non-administrative privileges when installing your solutions on the target PC.

Add-in Express provides the Publish dialog that you use to specify the following:

  • .MSI file generated by a setup project for your add-on, toolbar, or IE bar project
  • prerequisites (optional)
  • installation URL where all versions of the add-on will be located

The information above is used to generate three files:

  • setup.exe is an unmanaged executable, which is generated (using MSBUILD.EXE) only if the prerequisites are specified. It downloads and installs the prerequisites from the installation URL/Language ID/Version.
  • an automatically generated executable called downloader; it downloads the .MSI file from the installation URL/Language ID/Version and runs it. It is started either by setup.exe (when it finishes /installing prerequisites) or by the user (if no prerequisites are required). The name of the downloader is set to the name of your add-on project, say "myaddon.exe". You can't change this if you use prerequisites.

Context menu of the IE add-on project item in Solution Explorer

  • version_info.xml, an XML file describing add-on versions available to the user and their  installation URLs (see also Version_info.xml).

The user can only install your add-on after you actually publish the installer – just place setup.exe (if it exists) or the downloader executable on a web server, CD, network, etc.

To create an update for your add-on, you generate another .MSI and publish it via the Publish dialog. The dialog updates version_info.xml, generates setup.exe and downloader, and puts them into an appropriate folder (Installation URL/Language ID/Version). Then you upload the files onto the web server specified in version_info.xml for the previous add-on version.

When the code of your add-on calls the CheckForUpdates method, the version_info.xml is downloaded via HTTP and parsed. If there are no updates, the method returns an empty string. If new updates are available, the method returns either the URL for setup.exe (if it exists) or the URL of the downloader for the latest update available. Note that you can specify an arbitrary URL to be returned by CheckForUpdates. This allows implementing custom update logics, welcome pages, information pages, etc.

On the development PC

Step 1. Publish Dialog

Publishing means preparing files and information required for the technology.
Build a setup project for your add-on, toolbar, or IE bar and click the Publish Add-in Express Project item in the Build menu of your project.

Then you fill in the following textboxes: 

Publishing your IE add-on

  • Installer Path – the path to the .MSI file built by the setup project of your IE add-on solution
  • Installation URL – the URL of the root Web directory containing all versions of your add-on 
  • Icon File – a .ICO containing an icon for the downloader UI (optional) 
  • Certificate File – a .PFX providing the downloader certificate

Step 2. Prerequisites

Click the Prerequisites button and choose prerequisites required for your add-on.

IE add-on prerequisites

Note. For a clean PC, installing .NET Framework 2.0 and Windows Installer 3.1 is a must.

Step 3. Preferences

Clicking the Preferences button in the Publish dialog opens the following dialog:

Setting the preferences of your IE add-on

The value specified in the "Download page for updates" textbox is saved in the version_info.xml, which is queried by the CheckForUpdates method. This allows you to implement custom update logics. If this field isn't set, CheckForUpdates returns either the URL for setup.exe (if it exists) or the URL of the downloader for the latest update available.

Step 4. Generating the installer

When everything is ready, you click the Publish button. This generates a folder hierarchy that allows storing installers for any number of versions for any number of languages. The folder hierarchy is located in the Publish folder of your add-on project: 

Publish folder of your IE add-on project

The folders and their contents are given in the following table:

Folder name

Folder name description

Folder files

Publish 

Pre-defined name

Publish  Version_info.xml

1033 

The folder name is set to the language identifier of the .MSI file

None

1.0.0 

The folder name is set to version of the .MSI fileThe folder name is set to version of the .MSI file

  • Setup.exe
  • Downloader
  • .MSI

prerequisites

Pre-defined name

None

The file name of the downloader is set to the name of your project. The downloader can be renamed only if you don't use prerequisites.

Step 5. Publishing

Just copy Version_info.xml and folders under the Publish folder to the web server (or to another location) to make it available via the URL specified in the Installation URL field of the Publish dialog.

On the Target PC

Installing

The user downloads and runs setup.exe, which installs prerequisites that were specified when creating the installer. Note that depending on the IE extension type the user may be required to have the administrative privileges; only IE Bar projects can be installed by a standard user. When the prerequisites are installed, setup.exe downloads and runs the downloader. The downloader opens the following window illustrating the progress of downloading the .MSI file:

IE add-on downloader

Note. The Icon File field in the Publish dialog (see Step 1. Publish Dialog) defines the icon for this window.

When the .MSI is downloaded, the downloader runs it and if the "Quiet mode during install" flag (see Step 3. Preferences) is cleared, the .MSI installer shows its GUI. When the setup process is complete, the downloader closes its window.

Updating: Developer’s Perspective

You must provide a way for the user to invoke CheckForUpdates. Any control such as a main menu item, toolbar button, etc. will do. In the code of the corresponding event handler, you must call the CheckForUpdates method of your module (IEModule, IEBarModule, IEToolbarModule). CheckForUpdates downloads and parses version_info.xml using the URL specified in the Installation URL field at Step 1. Publish Dialog. If version_info.xml contains several updates, CheckForUpdates will return the URL for the most recent add-on version (the one that has the highest version number). The URL to return is determined as follows: 

  • If a web page was specified in Step 3. Preferences, CheckForUpdates returns the URL of the web page.
  • If the "Create setup program…" flag was set in Step 2. Prerequisites, CheckForUpdates returns the URL of the corresponding setup.exe. 
  • Otherwise, CheckForUpdates returns the URL of the downloader for the update.
  • In all other circumstances, CheckForUpdates returns an empty string.

Before you start the process, you need to know if the current user has appropriate privileges for uninstalling the current add-on version (and installing the new add-on version): call the IsUpdatable method of your module. The following table describes the return values of the method.

Environment

The value returned by IsUpdatable

IE Bar project on Windows XP

True

All other project types on Windows XP

False if the user is a standard user; True if the user is an administrator

Any project type on Windows Vista and Windows 7

True

You can also use IsNetworkDeployed (a method of your module) to check if the current add-on version was deployed via the web. 

Before starting the process, you may also want to warn the user that it will require closing all instances of Internet Explorer. 

Finally, you call IEApp.Navigate providing the appropriate URL as a parameter.

Updating: User’s Perspective

Setup.exe installs prerequisites, downloads the corresponding downloader and starts it. The downloader uninstalls the current add-on version, requests the user to close all IE instances, downloads the .MSI file and starts it. When the .MSI is installed (or when the installation process fails), the downloader closes.

Uninstalling

Uninstall the add-on in the usual way, via Control Panel.

IE add-on deployment <<

Back to Add-in Express for Internet Explorer homepage

Have any questions? Ask us right now!