[wix-users] Chained MSI error messages
Bradley.Smith at IGT.com
Thu Sep 1 17:21:55 PDT 2016
If I have a misconfigured MSI (say the XPath on an util:XmlFile element is incorrect) and I run just the MSI, I get a nice descriptive error that says what I did wrong (Could not find element at path X...) before it rolls back the install and goes to the end screen.
If I now run that MSI as part of a custom BA, I lose this error information. I tried the following in the handler for ExecutePackageComplete:
string errorMessage = new Win32Exception(Marshal.GetLastWin32Error()).Message;
But that just gave me something about a pipe.
string errorMessage = new Win32Exception(e.Status).Message;
Gives "A fatal error happened" (or something like that).
I would like to have the full descriptive error message so it is easier to debug failures without having to run the MSI by itself. How do I get that error message in my custom BA?
CONFIDENTIALITY NOTICE: This message is the property of International Game Technology PLC and/or its subsidiaries and may contain proprietary, confidential or trade secret information. This message is intended solely for the use of the addressee. If you are not the intended recipient and have received this message in error, please delete this message from your system. Any unauthorized reading, distribution, copying, or other use of this message or its attachments is strictly prohibited.
More information about the wix-users