难以捉摸的 wix 安装程序和 AdvancedWelcomeEulaDlg 对话框问题
Posted
技术标签:
【中文标题】难以捉摸的 wix 安装程序和 AdvancedWelcomeEulaDlg 对话框问题【英文标题】:the elusive wix installer and AdvancedWelcomeEulaDlg dialog issue 【发布时间】:2015-04-07 13:41:00 【问题描述】:我正在构建一个 WixUI_FeatureTree 类型的 WiX 安装程序,但我遇到了一个小问题,即 AdvancedWelcomeEulaDlg 弹出两次,即使在我同意许可之后也是如此。
流程很简单,在 AdvancedWelcomeEulaDlg 之前显示了一个额外的对话框(这是一个额外的同意协议页面)。
流程是:WelcomeDlg --> CustomEulaDlg --> AdvancedWelcomeEulaDlg,我可以选择使用 CustomizeDlg(高级)或 VerifyReadyDlg(安装)。
<Publish Dialog="CustomEulaDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="CustomEulaDlg" Control="Next" Event="NewDialog" Value="AdvancedWelcomeEulaDlg">1</Publish>
<Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced" Event="NewDialog" Value="CustomizeDlg">1</Publish>
<Publish Dialog="AdvancedWelcomeEulaDlg" Control="Install" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="AdvancedWelcomeEulaDlg" Order="1">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServiceAccountDlg" Order="2">NOT Installed OR WixUI_InstallMode = "Change"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="3">Installed</Publish>
进入 AdvancedWelcomeEulaDlg 页面并单击同意后,我希望已安装的人继续安装,而不是再次出现。我不是在验证什么吗?也许我在 VerifyReadyDlg 中遗漏了一步。
任何帮助将不胜感激。 WiX 有点复杂。
编辑:
Action 14:00:23: EulaDlg. Dialog created
MSI (c) (A4:5C) [14:00:23:760]: PROPERTY CHANGE: Adding EULACHECK property. Its value is '1'.
Action 14:00:24: AdvancedWelcomeEulaDlg. Dialog created
MSI (c) (A4:5C) [14:00:25:019]: PROPERTY CHANGE: Adding LicenseAccepted property. Its value is '1'.
Action ended 14:00:25: WelcomeDlg. Return value 1.
MSI (c) (A4:B8) [14:00:25:645]: Doing action: AdvancedWelcomeEulaDlg
Action 14:00:25: AdvancedWelcomeEulaDlg.
Action start 14:00:25: AdvancedWelcomeEulaDlg.
Action 14:00:25: AdvancedWelcomeEulaDlg. Dialog created
Action ended 14:00:26: AdvancedWelcomeEulaDlg. Return value 1.
MSI (c) (A4:B8) [14:00:26:336]: Skipping action: MaintenanceWelcomeDlg (condition is false)
MSI (c) (A4:B8) [14:00:26:336]: Skipping action: ResumeDlg (condition is false)
MSI (c) (A4:B8) [14:00:26:336]: Doing action: ProgressDlg
Action 14:00:26: ProgressDlg.
Action start 14:00:26: ProgressDlg.
Action 14:00:26: ProgressDlg. Dialog created
Action ended 14:00:26: ProgressDlg. Return value 1.
MSI (c) (A4:B8) [14:00:26:362]: Doing action: ExecuteAction
Action 14:00:26: ExecuteAction.
Action start 14:00:26: ExecuteAction.
【问题讨论】:
通过查看已完成的 MSI 的 ControlEvent 表可能更容易调试正在发生的事情。您的 Dialog 表中是否有两个 AdvancedWelcomeEulaDlg 对话框? @jbudreau 感谢您的建议,我检查了安装日志,似乎正在创建 AdvancedWelcomeEulaDlg(请参阅我的编辑)。 p.s.只有 1 AdvancedWelcomeEulaDlg, bu 在它是我称之为“EulaDlg”的自定义对话框之前,它在 AdvancedWelcomeEulaDlg 之前呈现 【参考方案1】:这是旧的,但我会添加它以防其他人遇到它。
我一直试图在AdvancedWelcomeEulaDlg
之前显示WelcomeDlg
,但是在发布调用中添加NewDialog
会使其出现两次。通过结束欢迎对话框,高级 EULA 只会出现一次。
<!--This is after copying the WixUI_UIAdvanced.wxs and modifying-->
<!--Publish action added to close WelcomeDlg on Next rather than NewDialog the EULA-->
<Publish Dialog="WelcomeDlg" Control="Next" Event="EndDialog" Value="Ignore">NOT Installed</Publish>
<!-- ... -->
<InstallUISequence>
<!--Adding the 1 condition, makes it show even when not in maintenance-->
<Show Dialog="WelcomeDlg" After="MigrateFeatureStates" >1</Show>
</InstallUISequence>
我仍然对 WiX/MSI 有感觉,但从 the source 看来,因为他们在 ProgressDlg
之前打电话,所以不应该打开它。
<InstallUISequence>
<Show Dialog="AdvancedWelcomeEulaDlg" Before="ProgressDlg">NOT Installed</Show>
</InstallUISequence>
【讨论】:
以上是关于难以捉摸的 wix 安装程序和 AdvancedWelcomeEulaDlg 对话框问题的主要内容,如果未能解决你的问题,请参考以下文章
使用 RANK 或 ROW_NUMBER 创建 Group-able ID 以在 SQL Server 中使用难以捉摸的顺序交替连接行值