0

I created a setup that consists of a package, a managed bootstrapper application, and a bundle.

I notet that when the package fails, under certain circumstances the Error event is not called. I already looked at InstallationViewModel.cs from the WixBA setup, but did not find a solution.

How can I correctly handle this?

Details:

The package creates a

<firewall:FirewallException ... />

and I noted that when the “Windows Firewall” service is not running, this will fail. (I don’t know whether that’s a bug or a feature, but this question is not about this.)

The log file of the package contains:

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)

The main log file contains:

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.

A rollback is executed, and that all works fine, but no error message is displayed to the user.

Which event should I handle to display an error message to the user? Any other way to handle this correctly?

Martin
  • 1,986
  • 15
  • 32
  • hey did you find a solution? Facing the same issue – AnOldSoul Jun 30 '16 at 11:13
  • @mayooran Before the installation actually starts, I test whether the firewall service is running and if not, warn the user. Kind of a hack, but it works. – Martin Jul 01 '16 at 21:49

1 Answers1

1

You can ignore the error by adding IgnoreFailure="yes" in the <firewall:FirewallException> element.

From the documentation http://wixtoolset.org/documentation/manual/v3/xsd/firewall/firewallexception.html

Note: This will not configure the firewall rules if an error occurs, but if the firewall is disabled then it should not be an issue.

  • OK, this will avoid the error, but then there won't be a firewall exception, what might become an issue at some later point in time. However, I can't see how this helps to answer my question how to display an (appropriate) error message. – Martin Jul 01 '16 at 21:53
  • @Martin it doesn't answer your main question - but you did ask if there was any other way to handle this correctly. And whilst this answer may still not be helpful for you, it may be helpful for others (since your question was the first thing that came up when I was searching for a solution to the same underlying issue of the firewall exception failing and silently rolling back the install) – Keith Deane Jul 03 '16 at 22:03
  • OK, I totally agree :) – Martin Jul 05 '16 at 20:01