InstallShield 2016 » InstallScript Language Reference
Project • This information applies to the following project types:
• | InstallScript |
• | InstallScript MSI |
The FeatureSelectItem function sets a feature’s selection status to either selected or not selected. You can use FeatureSelectItem to change selection status before displaying features in feature dialogs, and you can use it to change or override selections afterward, depending on your installation’s requirements.
Note • If you call a setup type selection function (such as FeatureSetupTypeSet, SetupType2, SdSetupType, or SdSetupTypeEx) after calling FeatureSelectItem, the feature selections set by FeatureSelectItem are overridden by the selections in the setup type. (This applies to features that you add to your installation project and does not affect internal features.) Be aware that SetupType2 is called in the default code for the OnFirstUIBefore event handler function, which is called after the OnBegin, OnCCPSearch, and OnAppSearch event handler functions are called. You can override or customize the OnFirstUIBefore event handler.
If you use FeatureSelectItem to deselect a feature, note that the same rules that apply to deselecting a feature through the feature dialog apply. That is, a feature cannot be deselected if it is required by a currently selected feature. Therefore, to deselect a feature that is required by another feature, ensure to deselect the requiring feature before attempting to deselect the required feature.
• | It is usually not necessary to call FeatureSelectItem during maintenance mode, since the previous feature selections are automatically loaded from the existing log file. |
Syntax
FeatureSelectItem ( szFeatureSource, szFeature, bSelect );
Parameters
Parameter |
Description |
||||||
szFeatureSource |
Specifies the media name of the script-created feature set or (in InstallScript projects) file media library containing the feature whose selection status is to be set. |
||||||
szFeature |
Specifies the feature whose selection status is to be set. You can specify a null string ("") for this parameter. If you specify a null string, all features from szFeatureSource are either selected or deselected, depending on the value of bSelect. For more information about specifying features and subfeatures in InstallScript, see Specifying Features and Subfeatures in Function Calls. |
||||||
bSelect |
Specifies whether the feature should be selected. Pass one of the following predefined constants in this parameter:
|
Return Values
Return Value |
Description |
0 |
FeatureSelectItem successfully set the feature’s selection status. |
< 0 |
FeatureSelectItem was unable to set the feature’s selection status. For additional information, call FeatureError. |
See Also
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |