Trigger roll back from CA
Posted 01 December 2001 - 00:17
Posted 03 December 2001 - 10:09
return ERROR_INSTALL_FAILURE;
This will invoke a rollback.
Posted 03 December 2001 - 19:54
Does ISWI catch the return code of executable and roll back?
How does it decide when to roll bakck?
Posted 03 December 2001 - 21:17
A roll back will occur (unless disabled) whenever a deferred action or custom action, returns with an error. Other actions are either before or after the time the installation is performed so I would not expect a roll back.
Posted 04 December 2001 - 01:43
I updated the dialog to return ERROR_INSTALL_FAILUER when it is cancelled. But, it still doesn't roll back and just displays Internal Error 2744.
Roll back can't be triggered if the custom action occurs after InstallFinalize? Does this mean the executable should be stored in the Binary table? Our custom action's location is "Installed with the product" so that it needed to be after the InstallFinalize in the sequences.
Posted 04 December 2001 - 09:59
It would only need to be after the InstallFiles or MoveFiles action.
I am not sure that custom user interface in the execute sequence complies with best practice.
Posted 05 December 2001 - 01:12
After replacing InstallFinalize with InstallExecute in the Sequeces, the rollback can be triggerred from our mfc dialog when it is cancelled.
The reason I used the dialog in Execute is that the dialog not only just ask some info, it also does lots of configurations works (e.g. CreateProcess...), and I wanted the configurator that can be re-run after install if users want to change the config.