Feature Event Handlers  Applies to InstallScript Projects  Applies to InstallScript MSI Projects

InstallShield DevStudio » InstallScript Language Reference

Feature event handlers carry out processes required just before and just after the installation or uninstallation of a single feature. The number of feature events and handlers depends on the number of features in your project.

To create an event handler function for a feature, select the feature name from the left event-category list, and select the event you want from the right event list. The IDE creates a second InstallScript file, called FeatureEvents.rul, in the InstallScript view.

Event Handler Description
OnInstalling Responds to the Installing event that is generated just before a feature is installed on the target computer.
OnInstalled Responds to the Installed event that is generated just after a feature is installed on the target computer.
OnUnInstalling Responds to the UnInstalling event that is generated just before a feature is uninstalled on the target computer.
OnUnInstalled Responds to the UnInstalled event that is generated just after a feature is uninstalled on the target computer.

Note that if you change the default feature event handler code in FeatureEvents.rul, you must put the following statement in Setup.rul to include your changes in the setup:

   #include "FeatureEvents.rul"
Note

Because Windows Installer controls the installation of features, the order in which feature event-handler functions are called cannot be specified. In addition, feature events are not launched until all features are copied to the target system.

Also note that feature-uninstallation events (OnUnInstalling and OnUnInstalled) are not called during rollback.

See Also