Windows Installer custom actions: commit action won't get executed

随声附和 提交于 2019-11-29 16:43:46

I would start by reading:

Installation Phases and In-Script Execution Options for Custom Actions in Windows Installer

A few things to understand about commit CA's:

Commit custom action are generally not meant to change the state of the machine. They are meant to cleanup rollback temp data.

Commit custom actions do not execute if rollback is disabled (by property or system policy) because that would mean there is no rollback data to clean up.

Occasionally commit custom actions are used to configure the machine when it's not possible to do a rollback and you want to defer the change until as late as possible. (Changing a user password, installing a DLL to the GAC ) In these scenarios costing should instruct the deferred custom action to do the work since the rollback/commit will never execute.

Rollback custom actions should be scheduled before the deferred custom action and commit actions should get scheduled after the deferred custom action. This is so that the script generation phase can create the script correctly.

If the deferred phase fails, the script is walked backwards so that the rollbacks are executed.

If all of the deferred phase succeeds, the commit script is executed walked forwards. This means that all deferred CA's must finish before any of the commits execute.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!