Closed sanjuleo closed 6 years ago
Yes you can do it for the BA implemented by yourself but you cannot control how the standard WixBA behave. The standard WixBA and implements its own error handling as WiX developers designed it and you have very limited customization options for it.
However if you are using your own BA (see 'WixBootstrapper_UI' sample) then you can use the same technique as the link you provided describes:
public class MainViewModel : INotifyPropertyChanged
{
public MainViewModel(BootstrapperApplication bootstrapper)
{
this.Bootstrapper.Error += this.OnError;
...
}
void OnError(object sender, ErrorEventArgs e)
{
MessageBox.Show(e.ErrorMessage);
}
...
Hi Oleg I need to raise error in MSi and capture them in bootstraper to display a message or put them in bootstraper log. My MSi is running in silent mode. For now I am putting them through session.Log(error) and quitting the installation, but they do not display in bootstraper log and user has to go to temp folder to find the MSI log and find the error.
I found this link to capture MSI errors in BA - http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Handling-error-from-MSI-in-Custom-BA-td7600313.html
Do we have something similar in Bundle?
Regards