[This is preliminary documentation and subject to change.]
Custom actions can be scheduled to run during any of the various phases of the install process. For more information about the phases of an installation, see Installation Mechanism.
If a custom action only sets properties, sets directories, or manipulates the installation database, then it should be scheduled to run during the acquisition phase when the database is processed. However, if a custom action performs any system changes directly, it should be scheduled to run during the execution stage when the install script is processed.
The installer does not provide the script engine but can use it if it is installed. Authors wishing to make use of a scripting language during installation should be certain that the appropriate scripting engine is available.
There are special restrictions that apply to deferred custom actions. See Information for Custom Actions for more information.
You can also schedule custom actions to run during rollback. This is described in more detail in Rollback of Custom Actions.