How to make WIX installer adapt to the version of Windows Installer available - like the Hyperlink control
Windo开发者_开发百科ws 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.
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.
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>
精彩评论