在操作对话框中添加自定义链接
我是 WIX 新手,使用的是 3.0。 我们可以在显示对话框的同时显示链接吗?基本上,当框架版本丢失时,我会停止安装。要求是将用户定向到某些资源,以下是我所做的:
<PropertyRef Id="NETFRAMEWORK10"/>
<Condition Message="Microsoft .NET Framework Version 3.5 is missing. To download please visit **$(var.FrameworkDownload)**">
<![CDATA[Installed OR NETFRAMEWORK10]]>
</Condition>
虽然它会显示网址,但显然用户无法单击它或复制它?我应该怎么做才能使其可点击?
I'm new to WIX and using 3.0.
Can we display a link while displaying a dialog? basically i am stopping the installation when a framework version is missing. Requirement is to direct the user to some resource, below is what i did:
<PropertyRef Id="NETFRAMEWORK10"/>
<Condition Message="Microsoft .NET Framework Version 3.5 is missing. To download please visit **$(var.FrameworkDownload)**">
<![CDATA[Installed OR NETFRAMEWORK10]]>
</Condition>
Though it will display the url, obviously user can't click it or copy it? What should i do make it click-able?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Windows Installer 不支持此功能。解决方案是使用先决条件而不是启动条件:Wix 和 .NET Framework(先决条件)< /a>
This is not supported by Windows Installer. A solution is to use a prerequisite instead of a launch condition: Wix and .NET Framework (prerequisites)
实际上有超链接< /em> MSI 中的控制类型。它可以满足您的要求,但 Windows Installer 4.5 及更早版本不支持它;从 Windows 7 附带的版本 5.0 开始支持它。(请参阅 Windows 的发布版本安装程序供参考。)
如果您在 Windows Installer 5.0 及更高版本中运行,则可以使用超链接控件有条件地显示文本;或者,如果您使用的是早期版本,请使用常规按钮控件显示文本说明。当用户单击该按钮时,它会打开您提供的 URL(在用户的默认浏览器中)。
There's actually Hyperlink control type in MSI. It does what you want, but it's not supported in Windows Installer 4.5 and earlier; it is supported as of version 5.0 which ships with Windows 7. (See Released Versions of Windows Installer for reference.)
You can conditionally display the text using Hyperlink control, if you're running in Windows Installer 5.0 and above; or if you're in an earlier version, display text description with a regular Button control. When user clicks the button, it opens the URL you provided (in the user's default browser).