How to show erros occuring during installation of prerequesites

0

Using Wix 3.10

When installing .NET 4.6 on Windows 8.0, the Microsoft package returns an error since the computer is missing anothger kb by microsoft. That's ok so far, but I want to show this message from the NET-installer in my custom wpf-UI, but I didn't figured out what event will trigger.

In my viewmodel I have the current instance of the BootstrapperApplication and my first approach will not log anything:

 internal MainViewModel(BootstrapperApplication model, Action<LogLevel, string> onLoggerAction, (....))
{
  this.Model = model;
  this.Model.DetectPackageComplete += this.DetectPackageComplete;
  this.Model.DetectRelatedBundle += new EventHandler<DetectRelatedBundleEventArgs>(this.Model_DetectRelatedBundle);
  this.Model.DetectPriorBundle += new EventHandler<DetectPriorBundleEventArgs>(this.Model_DetectPriorBundle);
  this.Model.DetectRelatedMsiPackage += new EventHandler<DetectRelatedMsiPackageEventArgs>(this.Model_DetectRelatedMsiPackage);
  this.Model.DetectTargetMsiPackage += new EventHandler<DetectTargetMsiPackageEventArgs>(this.Model_DetectTargetMsiPackage);
  this.Model.Error += this.SetupError;
  [...]
}

public void SetupError(object sender, ErrorEventArgs args)
{
   this.onLoggerAction(LogLevel.Standard, string.Format("Error occured. Message: {0}", args.ErrorMessage));
   this.onLoggerAction(LogLevel.Standard, string.Format("Error occured. ErrorCode: {0}", args.ErrorCode));
   this.onLoggerAction(LogLevel.Standard, string.Format("Error occured. Type: {0}", args.ErrorType));
   this.dispatcher.BeginInvoke((Action)(() => this.ShowErrorView(args)));
}

The log file shows the error:

[07D0:06D4][2016-05-09T09:16:36]i301: Applying execute package: Netfx4FullInternal, action: Install, path: C:\ProgramData\Package Cache\3049A85843EAF65E89E2336D5FE6E85E416797BE\NDP46-KB3045557-x86-x64-AllOS-ENU.exe, arguments: '"C:\ProgramData\Package Cache\3049A85843EAF65E89E2336D5FE6E85E416797BE\NDP46-KB3045557-x86-x64-AllOS-ENU.exe" /passive /norestart'
[07D0:06D4][2016-05-09T09:18:11]e000: Error 0x800713ec: Process returned error: 0x13ec
[07D0:06D4][2016-05-09T09:18:11]e000: Error 0x800713ec: Failed to execute EXE package.
[0928:09AC][2016-05-09T09:18:11]e000: Error 0x800713ec: Failed to configure per-machine EXE package

But how can I handle this error?

installation
wix
bundle
asked on Stack Overflow May 9, 2016 by Torben - TSC

1 Answer

0

You already have the "/norestart" and "/passive" arguments in use, try using the "/log C:\pathtolog\yourlog.log" aswell so you can see what goes wrong.

Before shipping your installer you should have fixed all the errors, not display them all.

Imagine installing something and thousands of errors show up....

answered on Stack Overflow May 10, 2016 by Stijn De Winter

User contributions licensed under CC BY-SA 3.0