cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Lewis99
Level 4

DTF Rollback Problem

Can someone tell me how to rollback an MSI installation using a DTF CA written in C#?

I am using a CA to configure my SQLServer/Oracle database. I am running the it after InstallFinalize. If anything fails in the script I return ActionResult.Failure.

However, despite getting the 'your system has not been modified' dialog, no rollback is run and the Program files and Add/Remove entries are left in.

How can I get it to do a full rollback (similar to the standard Installshield SQLServer functionality)?
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

I know the word rollback is a little overloaded ( MSI vs SQL ) but your CA should be scheduled as deferred and before InstallFinalize. You probably don't need a rollback CA because you'll probably establish an SQL transaction within your deferred CA and initiate the rollback from there on error. Then the rest of your rollback script will get processed to take the app off of the machine.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

That sounds correct if the error is in the DTF action. However if the error occurs after this action, causes a rollback, and the effects of the DTF action should be undone, this probably requires another action scheduled for rollback. Unless there's something cool in DTF which does this for you somehow...
0 Kudos
Christopher_Pai
Level 16

Thank Michael, you are correct.

Try explaining all of this to a DBA of course...... sometimes there head is so buried in TSQL that it's impossible to get them to integrate with the installer. Makes me want to just ban SQL changes in my installs... 😞
0 Kudos