Shop

InstallShield
Advanced Installer
AdminStudio
more / weitere

InstallShield und AdminStudio Schulungen

weitere Infos

More Windows Installer articles

Careful with that Hyperlink (on your MSI dialog)

This article was originally published on the InstallSite Blog on 18 September 2009.

One of the new features in version 5 of the Windows Installer runtime is support for hyperlink controls on setup dialogs. Remember that MSI 5 is only available on Windows 7 and Windows Server 2008 R2, but there's no redistributable for down-level platforms.

In most cases when introducing new features, the MSI team made sure they don't break your setup on older runtime versions. For instance, older MSI versions simply ignore new tables that they can't use. This enables developers to create a setup that will run with basic functionality on older platforms but on the latest MSI version the new features would "light up".

The hyperlink control is different, maybe because it's not a table but a new control type in an existing table, the Control table. Thus, it causes your setup to fail on Windows Installer versions prior to MSI 5:

Dialog with hyperlink control on Windows 7
HyperlinkW7
Dialog with hyperlink control on Windows Vista
HyperlinkVista

Error code 2885 means "Failed to create the control [3] on the dialog [2]."

Workaround

To work around this issue, create two versions of the dialog, one with the hyperlink control, and the other without. Use these condition to display the appropriate dialog:

Note that making the hyperlink control invisible for MSI versions < 5 doesn't help. You really need a separate dialog.

How to create a hyperlink control (if your tool doesn't support it)

I've used Advanced Installer to create the above screen shots, because its dialog editor can create hyperlink controls. If you are using InstallShield or another tool that doesn't support hyperlink controls (yet) but has a way to modify the msi tables directly, you can create a hyperlink control using these easy steps:

  1. Create a static text control
  2. Set its text in HTML format: like this:
    <a href=http://www.installsite.org>www.InstallSite.org</a>
    where the href parameter specifies the URL and the text between the opening and the closing tag is what gets displayed.
  3. Go to Direct Editor and select the table named Control.
  4. Find your text control and change the Type from Text to Hyperlink.

This manual procedure even gives you more flexibility. For instance you could hyperlink only part of the text, while in Advanced Installer the complete text is hyperlinked. The following screen shot was created with InstallShield using this string for the Hyperlink Text:

Please visit <a href="http://www.installsite.org">InstallSite.org</a> for more samples

HyperlinkIS

About the Author

Stefan Krueger is working as freelance setup consultant and is running the InstallSite.org web site, a place where setup developers share resources and information among peers. Stefan has been recognized by Microsoft as an MVP (Most Valuable Professional) for Windows Installer.

More Windows Installer articles

 

 

English News Discussions Windows Installer Related Tools More Help InstallScript About InstallSite Shop Site Search
deutsch Neuigkeiten Diskussionsgruppen Windows Installer MSI FAQ Artikel     Shop Suche

Copyright © by InstallSite Stefan Krueger. All rights reserved. Legal information.
Impressum/Imprint Datenschutzerklärung/Privacy Policy
By using this site you agree to the license agreement. Webmaster contact