Επεξεργασία

Κοινή χρήση μέσω


Synchronous and Asynchronous Custom Actions

The Windows Installer processes custom actions as a separate thread from the main installation. During synchronous execution of a custom action, the installer waits for the thread of the custom action to complete before continuing the main installation. During asynchronous execution, the installer runs the custom action simultaneously as the current installation continues. Authors of custom actions must therefore be aware of any asynchronous threads that may be making changes to the installation database between function calls.

In particular, calls to MsiGetTargetPath and MsiSetTargetPath should be avoided in asynchronous custom actions. Instead use MsiGetProperty to obtain a target path. Bulk database operations such as import, export, and transform operations should be avoided in any type of custom action.

Option flags can be set in the Type field of the CustomAction table to specify that the main and custom action threads run synchronously or asynchronously. See Custom Action Return Processing Options.

The installer can only execute Rollback Custom Actions and Concurrent Installation actions as synchronous custom actions.