Thanks Rob. For me, this is a thought experiment in which I was trying to
learn more about rollback CAs. So, my scenario is (similar to editing an XML
file with XmlFile), I wanted to install a JSON file and edit it at
install-time. If the installation failed, I would rollback the file to what
it was originally (it's original version that's stored in the MSI).

Now, a few things are occurring to me about this hypothetical scenario:

1. If the installer is going to roll back, the file is going to be
uninstalled, and then does it really matter if the file gets reverted to
what is stored in the MSI before it's ultimately removed from the machine?

2. If I only care about restoring a file if it already exists on the
machine, then yes, an immediate CA will work just fine. In the immediate
stage, I'll be able to read the file's contents and store that in
CustomActionData. On the other hand, if the file did not already exist, then
I will only be able to read it/write to it after it has been installed --
which only occurs in the deferred execute stage. And at that point, it's
impossible to pass that info to the rollback CA. But, maybe this is a silly
situation, since the file, in that case, is going to be removed during a
rollback anyway.

3. If I only care about undoing changes to the file if it already exists on
the machine, then I think my scenario becomes more complex. I may need: (a)
AppSearch to see if the file exists, (b) a property to store the results of
AppSearch, (c) an immediate CA that saves the contents of the file if it was
found, (d) a rollback CA that restores it if it was found.

Am I thinking about this correctly?



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-pass-data-from-deferred-CA-to-rollback-CA-tp7596739p7596753.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to