使用WIX的InstallDir UI扩展时,有条件地在两个退出对话框之间进行选择 [英] Conditional choose between two exit dialog when using WIX's InstallDir UI extension

查看:82
本文介绍了使用WIX的InstallDir UI扩展时,有条件地在两个退出对话框之间进行选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望基于VersionMsi属性的版本具有两个不同的退出对话框,以便将超链接控件用于退出对话框。更多信息此处

I would like to have two different exit dialogs based on the version of the VersionMsi property in order to utilize the hyperlink control for the exit dialog. More information here.

我正在使用WIX的自定义版本我的安装过程的InstallDir_UI扩展。由于我想可选地支持超链接控件(如果可用),因此创建了两个不同的对话框:

I'm using a customized version of WIX's InstallDir_UI extension for my install process. Since I would like to optionally support the hyperlink control if available, I have created two different dialogs:

<Dialog Id="NonHyperlinkExit" Width="370" Height="270" Title="!(loc.ExitDialog_Title)">
    <Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" />
    ...
    <Control Id="HowToLink" Type="Text" X="135" Y="175" Width="220" Height="10" Transparent="yes" NoPrefix="yes" Text="!(loc.InfoUrl)" />
    ...
</Dialog>

<Dialog Id="HyperlinkExit" Width="370" Height="270" Title="!(loc.ExitDialog_Title)">
    <Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" />
    ...
    <Control Id="HowToHyperLink" Type="Hyperlink" X="135" Y="175" Width="220" Height="10" Text="!(loc.InfoLink)" />
    ...
</Dialog>

然后我修改了UI publish语句以支持这些对话框,如下所示:

I've then modified the UI publish statements to support those dialogs to something like this:

<Publish Dialog="NonHyperlinkExit" Control="Finish" Event="EndDialog" Value="Return" Order="998"><![CDATA[VersionMsi < "5.0"]]></Publish>
<Publish Dialog="HyperlinkExit" Control="Finish" Event="EndDialog" Value="Return" Order="999"><![CDATA[VersionMsi >= "5.0"]]></Publish>

运行此程序时,出现以下错误:

When running this, I get the following errors:

error LGHT0204: ICE20: Exit dialog/action not found in 'AdminUISequence' Sequence Table. 
error LGHT0204: ICE82: This action HyperlinkExit has duplicate sequence number -1 in the table InstallUISequence



因此,我尝试改为修改InstallUISequence,但几乎没有帮助。尝试过以下方法:

So I've tried to modify the InstallUISequence instead, but with little help. Tried this:

<InstallUISequence>
    ...
    <Show Dialog="NonHyperlinkExit" Before="HyperlinkExit"><![CDATA[VersionMsi < "5.0"]]></Show>
    <Show Dialog="HyperlinkExit" OnExit="success"><![CDATA[VersionMsi >= "5.0"]]></Show>
</InstallUISequence>

但这只会给我以下错误:

But this only give me the following error:

error LGHT0177: The InstallUISequence table contains an action 'NonHyperlinkExit' that is scheduled to come before or after action 'HyperlinkExit', 
which is a special action which only occurs when the installer terminates.  
These special actions can be identified by their negative sequence numbers.  
Please schedule the action 'NonHyperlinkExit' to come before or after a different action.

任何有关如何创建条件退出对话框的想法都会受到赞赏。

Any ideas on how to create conditional exit dialogs would be appreciated.

推荐答案

MSI每种状态仅支持一个退出对话框(例如,成功)。您可以改用显示相应对话框的自定义操作。

MSI supports only one exit dialog per state (e.g., success). You could use a custom action instead that showed the the appropriate dialog.

这篇关于使用WIX的InstallDir UI扩展时,有条件地在两个退出对话框之间进行选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆