问题
Windows Installer 5 added support for the Hyperlink control which I would like to utilize if available. I cannot set a dependency towards Windows Installer 5 (doesn't support WinXP), but I would like my installer to be able to utilize the hyperlink control if Windows Installer 5 is available when running the installer.
How do you manage to do this? Conditional imports of fragment files based on the versionMsi property? A Google code search or regular Google search didn't reveal many samples.
回答1:
You'll want to read this article:
Careful with that Hyperlink (on your MSI dialog)
The summary is you create two nearly idential dialogs and create mutually exclusive control events to drive which one gets displayed based on your MSI version.
回答2:
I am using WIX Installer and used this code. Wix is a free open source tool and is same like the costly other tools. I used this code for hyperlink and it works perfect
<Control Id="MyHyperlinkControl1" Height="20" Width="100" Type="Hyperlink" X="5" Y="105">
<Text><![CDATA[<a href="http://www.stackoverflow.com/">Stackoverflow</a>]]></Text>
</Control>
来源:https://stackoverflow.com/questions/5016620/how-to-make-wix-installer-adapt-to-the-version-of-windows-installer-available