Pages

Showing posts with label different between execute immediate and execute deferred. Show all posts
Showing posts with label different between execute immediate and execute deferred. Show all posts

Tuesday 30 August 2011

Difference between Execute Immediate and Execute Deferred



Immediate Execution
You use this option if the custom action should be executed during Windows Installer’s first pass through the installation database, which executes before any scripts. Custom actions run in Immediate Execution mode can change properties, feature states, component states, target directories, or schedule system operations. They can also be placed in the UI Sequence or in the Execute Sequence. If your custom action requires install files or registry keys, then it should be executed after the InstallFinalize sequence.

Deferred Execution
You use this option if the custom action should be executed later, during the install script installation. This is the best option if your custom action depends on a file that is installed with the installation and if the custom action changes the system directly. Deferred custom actions cannot change properties in the Property table, call another system service, or change the system directly. A custom action using Deferred Execution can only be placed in the Execute Sequence after the InstallInitialize sequence and before the InstallFinalize sequence. When using a custom action set to Deferred Execution, the session handle and the property data set during the installation sequence are not available