October 2010
Intermediate to advanced
348 pages
7h 10m
English
Custom actions that are scheduled as "deferred" execute during the Execute sequence's rollback-protected phase. To give those actions rollback capabilities, you'll need to author separate custom actions that undo the work. These are scheduled as "rollback" . Rollback custom actions are scheduled before the action they're meant to revert in case of an error. Here's an example:
<CustomAction Id="systemChangingCA" Execute="deferred" Script="vbscript"> msgbox "Imagine this changes the system in some way" </CustomAction> <CustomAction Id="myRollbackCA" Execute="rollback" Script="vbscript"> msgbox "Imagine this undoes the changes" </CustomAction> <CustomAction Id="causeError" Execute="deferred" Script="vbscript"> return failure ...
Read now
Unlock full access