0

I need to end my installation early based on a certain condition, after displaying the Welcome Dialog, then a custom message dialog (already written) explaining why the installer is exiting. Here's my code:

    <Publish Dialog="WelcomeDlg" Control="Next" Event="DoAction" Value="CheckForCondition" Order="1">1</Publish>
    <Publish Dialog="WelcomeDlg" Control="Next" Event="SpawnDialog" Value="ConditionExistsMsgDlg" Order="2">CONDITIONEXISTS = "1"</Publish>
    <Publish Dialog="WelcomeDlg" Control="Next" Event="?????" Value="??????" Order="3">CONDITIONEXISTS = "1"</Publish>
    <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="AfterWelcomeDlg" Order="4">CONDITIONEXISTS = "0"</Publish>

What goes in the Event and Value fields in Order=3? I tried WixExitEarlyWithSuccess CA, but that did indicate an error. I'd like to just go to some sort of Finished dialog without MSI informing the user that there was an error. Is this possible?

4

2 回答 2

1

教程中指出,从带有“返回”的对话框返回会恢复正常操作(取消按钮会做什么),而“退出”用于中止整个安装过程.. 很可能对话框 UserExit.wxs 将被链接为此(通过 OnExit="cancel"!)并根据您使用的对话框集显示。如果您不想在“退出”后显示任何内容,则需要从 UI 中删除 UserExit ..

您可以下载 Wix 工具集源 (wixXY-debug.zip) 并查看文件夹“..\src\ext\UIExtension\wixlib”,如果您想查看它是如何在标准对话框中完成的,例如 UserExit.wxs .

于 2014-11-06T17:37:43.677 回答
1

Event 应该是 NewDialog,Value 应该是您想要显示的自定义对话框(某种 Finished 对话框),例如 CustomExitDlg。

您还需要确保安装程序在单击完成(或您在自定义最终屏幕上定义的其他按钮)后返回。这是默认 WiX 安装 UI 的标准规则:

<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
于 2012-05-11T07:15:49.593 回答