Specifying a Non-Default Feature Event Handler Function
InstallShield 2026
By default, if the file Setup.rul exists in the InstallScript view and defines a function <feature name>_<event name> (for example, NewFeature1_Installing), then that function is the handler for that event of that feature.
You can select a different function to be the handler for the feature event. It can be any function defined in any script file in the InstallScript view, as long as it takes no arguments and is declared using the export keyword, for example:
export prototype MyFeatureHandler();
To specify a non-default feature event handler function, do the following:
| 1. | Open a script file (.rul file) in the InstallScript view. |
| 2. | Do one of the following in the script editor pane: |
| • | Declare and define the function that you want to specify as a feature event handler. |
| • | In the Event Category and Event lists at the top of the script editor pane, select the feature and select an event handler. InstallShield automatically creates the event handler (for example, Feature1Installing). |
Note:If you put parentheses in a feature’s name, event handler functions with names of the default form <feature name>_<event name> will not compile properly.