[wix-users] Fwd: WiX Error Handling
egcastr at gmail.com
Fri Jan 11 10:33:18 PST 2019
There are many processes involved in an MSI installation. There is a client
process that detects and makes decisions on what to do. The client process
is the one responsible for running the InstallUISequence which drives your
UI dialogs. There is also a server process that is responsible for making
changes to your system. The server process runs standard actions. There are
also one or more processes used to execute custom actions. These processes
are sandboxed from the main client and server processes so that issues with
custom actions do not affect the main installation sequence. I expect there
is some communication between the process running your CloseApplications
custom action and the server process but the data from the server process
is not getting communicated back to the client process which is responsible
for your UI. My recollection matches Rob's in that communicating a property
from the server process back to the client process is not allowed but you
could try making the property secure just in case our recollection is wrong.
Edwin G. Castro
On Fri, Jan 11, 2019 at 10:25 AM Todd Hoatson via wix-users <
wix-users at lists.wixtoolset.org> wrote:
> Further Details:
> 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
> return ActionResult.Failure;
> 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
> Why is this happening? What can I do about it?
> Todd Hoatson
> WiX Toolset Users Mailing List provided by FireGiant
More information about the wix-users