[wix-users] Fwd: WiX Error Handling
todd.hoatson at gmail.com
Fri Jan 11 09:49:34 PST 2019
In my WiX code (near the top, below the Product, Package & Upgrade tags) I
have the following property initialization:
<Property Id="ERRMSG" Value="Undetermined Error" />
Then, within my custom action (in C#), I have these lines (as mentioned
previously) to force a failure:
session["ERRMSG"] = "Problem encountered while closing the
In the log file produced by my installer I see the following:
MSI (s) (0C!4C) [10:55:58:092]: PROPERTY CHANGE: Modifying ERRMSG property.
Its current value is 'Undetermined Error'. Its new value: 'Problem
encountered while closing the application'.
CustomAction CloseApplications returned actual error code 1603 (note this
may not be 100% accurate if translation happened inside sandbox)
Property(S): ERRMSG = Problem encountered while closing the application
MSI (c) (24:58) [10:55:58:133]: Doing action: FatalErrorDlg
Action 10:55:58: FatalErrorDlg.
Action start 10:55:58: FatalErrorDlg.
Action 10:55:58: FatalErrorDlg. Dialog created
Action ended 10:56:23: FatalErrorDlg. Return value 2.
Action ended 10:56:23: INSTALL. Return value 3.
MSI (c) (24:58) [10:56:23:082]: Destroying RemoteAPI object.
MSI (c) (24:50) [10:56:23:082]: Custom Action Manager thread ending.
Property(C): ERRMSG = Undetermined Error
>From this I see that the property has been properly initialized prior to
it's modification in the custom action. After the custom action has
returned to the WiX code, the property still has the updated value. Then
the FatalErrorDlg is activated and closes. But after that the property
appears to be initialized again to the generic message!
1. Why is the property being initialized twice?
2. FatalErrorDlg shows the generic message, "Undetermined Error", rather
than the updated message, "Problem encountered while closing the application".
Why is this happening? What can I do about it?
More information about the wix-users