我正在尝试使用 Burn 连续运行多个 MSI,对于其中一个 MSI,我需要显示 UI,因为用户必须选择各种安装选项。
<MsiPackage
Id="SomeVisibleMsi"
Name="$(var.SomeOtherProject.TargetName)-x86.msi"
SourceFile="$(var.SomeOtherProject.TargetDir)\..\$(var.SomeOtherProject.TargetName)-x86.msi"
InstallCondition="NOT VersionNT64"
SuppressSignatureVerification="yes"
Permanent="no"
After="SomeOtherMsi_x86"
DisplayInternalUI="yes"
Vital="yes"
Visible="yes"
EnableFeatureSelection="yes">
</MsiPackage>
此安装程序还包含一个deferred
Custom Action
如果在执行操作时发生错误,将显示一条消息。
<CustomAction
Id="MyCustomAction"
BinaryKey="MyCustomAction.CA.dll"
DllEntry="DoSomething"
Execute="deferred"
Return="check"
Impersonate="no" />
自定义操作中的 session.Message 调用:
Record message = new Record();
message.FormatString = string.Format("MyCustomAction {0} - Uh oh, something went wrong.", DateTime.Now);
session.Message(InstallMessage.Warning | (InstallMessage)MessageButtons.OK, message);
问题
单独运行 MSI 时,该消息会正确显示(阻止安装,直到按下 OK)。但是,当通过 Burn 启动 MSI 时,安装程序会在调用显示消息时阻止,但不会弹出消息框。此时安装程序变得无响应,终止它的唯一方法是使用任务管理器。终止后,控制权返回到 Burn Bootstrapper 并出现消息框。
我是否在这里配置了错误,或者 WiX 根本不支持此功能(使用 DisplayInternalUI="yes" 时的 session.Message)?