[wix-users] Deferred Custom Action Issue in Upgrade

Hoover, Jacob Jacob.Hoover at greenheck.com
Tue Sep 4 10:11:11 PDT 2018


Your CA should test that the file exists, and that the property has a value. You haven't provided the authoring of when you are setting the CA data, so it's entirely possible that you aren't setting the property or that the path could change between install and upgrade.

Logging from your CA would also help root cause the issue.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Ven H via wix-users
Sent: Sunday, September 2, 2018 10:30 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Ven H <venh.123 at gmail.com>
Subject: [wix-users] Deferred Custom Action Issue in Upgrade

I have a Deferred Custom Action which is scheduled Before InstallFinalize.
In this Custom Action, I have the following 2 lines in the beginning.

string xmlPath =
System.IO.Path.Combine(session.CustomActionData[Constants.INSTALL_LOCN_CA_DATA_VAR],
"MyXml.xml");
XDocument appPoolDoc = XDocument.Load(xmlPath);

Essentially, I am reading the xml file to update some app pool properties.

These 2 lines work fine and also the rest of the code during installation.
But during Upgrade, the XDocument.Load line is throwing a File Not Found exception in the log, even if the file is present. I am not sure what is going wrong. The Major Upgrade is scheduled After Install Execute. Can anyone please help me with this issue?

Also, I have some other observations / questions.

1. I am able to schedule an immediate custom action After Install Finalize, but I am not able to schedule a deferred custom action After Install Finalize (but only before). In that case, why should I use a deferred custom action and where should I use it?

2. In case of a deferred custom action, even when an exception occurs, it is simply rolling back without showing an error message. Then I have to search the log for the correct exception, even though I have set the Return="check" attribute on the deferred custom action.

3. Why is my deferred custom action able to find the file during install, but not able to find it during upgrade.

Can anyone please help?

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list