MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Types of Custom Actions[Next]: Deferred Custom Actions
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Windows Installer FAQ (the basics)->Custom Actions->Types of Custom Actions->Commit and Rollback Custom Actions

Commit and Rollback Custom Actions

All deferred custom actions are executes as part of a "transaction" (just like SQL database changes), if any part of this transaction fails then Rollback of any changes already made occurs. If the transaction completes successfully then the changes are committed.

Sometimes commit/rollback support is almost impossible to add and other times it is overkill, for example in a corporate rollout of a well tested application where failure won't damage the computer or effect future successful installation.

Note that because "immediate" custom actions are not part of a transaction they should not update the computer (they should be query only) as any effects can't be undone.

Rollback custom actions must be scheduled before the custom action that will perform the changes, the commit custom action should be after, all of these must must of course be scheduled between "InstallInitialize" and "InstallFinalize".

Most of the deferred custom actions demonstrated in this manual do not support commit and rollback because it would very much complicate the logic as it would require 3 seperate custom actions where one is currently used. It is also hard to do right, for this reason native Windows Installer mechanisms should always be used where available.


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Types of Custom Actions[Next]: Deferred Custom Actions


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday August 13 2017 at 2:39pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.