cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Christoph
Level 8

Deferred Custom Action - Rollback

During installation time of my product, I create an empty folderstructure.
The application I install, puts some files in there while it is running.

During complete uninstall, this folderstructure needs to be cleaned up/removed completely. Since the uninstaller only uninstalls the files/folders it has copied during installation time, I've created a deferred InstallScript custom action to take care of this.

I've read that every deferred custom action should have its rollback counterpart.
Any idea what this rollback custom action needs to do and where it needs to be sequenced?

Should it be rollback execution or rollback execution in system context?
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

The rollback action should be scheduled before the action it rolls back, and its implementation should undo/restore whatever the action did. (As for detecting a complete uninstallation, REMOVE="ALL" usually does the trick.)

The rollback action's use of "...in system context" should probably match the setting used by the action it rolls back. The documentation has more information about "in system context".
0 Kudos
Christoph
Level 8

Robert,

Ok, i understand where and how to schedule the rollback action.

But as my custom action removes a folderstructure, what should i initially do the be able to execute the rollback action? Should I backup the whole folderstructure myself before I remove it in the custom action or...? And I assume if no rollback occurs, I should cleanup the backed up folder but where do I do that...?
0 Kudos
KathyMorey
Level 10

Should I backup the whole folderstructure myself before I remove it in the custom action or...?

Yes, I think that's the only way to be sure you can "undo" it.

And I assume if no rollback occurs, I should cleanup the backed up folder but where do I do that...?

If you do that in a "commit" custom action, it will happen when the install successfully completes.
0 Kudos