[This is preliminary documentation and subject to change.]
Custom actions that schedule system operations by inserting rows into the appropriate tables are automatically rolled back if the installation is unsuccessful. However, if a custom action performs operations on its own or issues commands to other services, these operations or commands cannot be automatically rolled back. You must provide a custom action that performs the necessary operations during rollback processing.
A rollback custom action is designated as described in Custom Action Types. When this action is invoked during the installation sequence, its execution is deferred until rollback as described in Deferred Execution of Custom Actions.