0

我创建了一个包含一个包、一个托管引导程序应用程序和一个包的设置。

我注意到,当包失败时,在某些情况下Error不会调用该事件。我已经InstallationViewModel.cs从 WixBA 设置中查看过,但没有找到解决方案。

我怎样才能正确处理这个?

详情

该包创建一个

<firewall:FirewallException ... />

我注意到当“Windows 防火墙”服务没有运行时,这将失败。(我不知道这是错误还是功能,但这个问题与此无关。)

包的日志文件包含:

ExecFirewallExceptions:  Installing firewall exception2 Foo (C:\Program Files (x86)\Foo\Foo.exe)
ExecFirewallExceptions:  Error 0x800706d9: failed trying to find existing app
ExecFirewallExceptions:  Error 0x800706d9: failed to add/update application exception for name 'Foo', file 'C:\Program Files (x86)\Foo\Foo.exe'
CustomAction WixExecFirewallExceptionsInstall returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

主日志文件包含:

e000: Error 0x80070643: Failed to install MSI package.
e000: Error 0x80070643: Failed to execute MSI package.
e000: Error 0x80070643: Failed to configure per-machine MSI package.

执行回滚,一切正常,但不会向用户显示错误消息。

我应该处理哪个事件来向用户显示错误消息?还有其他方法可以正确处理吗?

4

1 回答 1

1

您可以通过添加元素IgnoreFailure="yes"来忽略错误。<firewall:FirewallException>

从文档http://wixtoolset.org/documentation/manual/v3/xsd/firewall/firewallexception.html

注意:如果发生错误,这不会配置防火墙规则,但如果防火墙被禁用,那么这应该不是问题。

于 2016-07-01T00:27:18.303 回答