Summary
This article explains how to associate certain actions to features using RulesSynopsis
Both the Install and Uninstall sequences allow you to assign actions and files to Product Features. This allows the end user to install the files and execute the actions that are only associated with the Product Features they have chosen. For more information on assigning files to features, refer to the Additional Information section below.If an action in the Pre-Install, Post-Install, Pre-Uninstall, or Post-Uninstall sequences is required to execute only when a certain Product Feature is chosen, assigning these actions to a Product Feature is not possible. Instead, Rules will need to be used for associating these actions to Product Features or Install Sets.
Discussion
To have an action execute depending on which Product Features were chosen, add a Compare InstallAnywhere Variables Rule to the action and use the following applicable InstallAnywhere variables within the Rule:| Variable | Description |
| $CHOSEN_FEATURE_LIST$ | The $CHOSEN_FEATURE_LIST$ variable is a comma-separated list of all the end user?selected features (short names). You can alter the features that will be installed by altering the value of this variable; however, you must understand that the string value of this variable does not clearly represent feature dependencies or parent-child relationships. You can infer these relationships from the string value of $CHOSEN_FEATURE_LIST$ if you fully understand the relationships between the installer's features and the function of the Choose Install Set panel. Installers interpret the string value of this variable and discard values that do not make sense. Hence, if you add a feature that does not exist in the installer, that portion of the $CHOSEN_FEATURE_LIST$ is ignored. Likewise if you alter this string in a way that violates feature dependencies or parent-child relationships, you may get a different result when you read back the value of this variable. Note: Use this variable, along with $CHOSEN_FEATURE_n$ and $CHOSEN_FEATURE_NUM$, to track the features that your end users select during install and uninstall. A similar set of variables exists ($CHOSEN_INSTALL_FEATURE_LIST$, $CHOSEN_INSTALL_FEATURE_NUM$, $CHOSEN_INSTALL_FEATURE_n$, and $FEATURE_UNINSTALL_LIST$). However, you can use the CHOSEN_FEATURE set of variables at install and uninstall by specifying features? short names, which are not localizable and thus serve as consistent IDs, regardless of the locale in which the installer or uninstaller is running. |
| $CHOSEN_FEATURE_n$ | One $CHOSEN_FEATURE_n$ variable is created for each feature counted in the variable $CHOSEN_FEATURE_NUM$. These variables hold the short name of a feature to be installed. For example, if $CHOSEN_FEATURE_NUM$ equals 2, two variables of this form are created: $CHOSEN_FEATURE_1$ and $CHOSEN_FEATURE_2$. Note: Use this variable, along with $CHOSEN_FEATURE_LIST$ and $CHOSEN_FEATURE_NUM$, to track the features that your end users select during install and uninstall. A similar set of variables exists ($CHOSEN_INSTALL_FEATURE_LIST$, $CHOSEN_INSTALL_FEATURE_NUM$, $CHOSEN_INSTALL_FEATURE_n$, and $FEATURE_UNINSTALL_LIST$). However, you can use the CHOSEN_FEATURE set of variables at install and uninstall by specifying features? short names, which are not localizable and thus serve as consistent IDs, regardless of the locale in which the installer or uninstaller is running. |
| $CHOSEN_FEATURE_NUM$ | This variable holds the total number of features (as a string) that the end user chooses to install. For example, if the end user chooses 3 features during the install, the value of CHOSEN_FEATURE_NUM is 3, and the short names of these features can be referenced in the variables $CHOSEN_FEATURE_1$, $CHOSEN_FEATURE_2$, and $CHOSEN_FEATURE_3$. Note: Use this variable, along with $CHOSEN_FEATURE_n$ and $CHOSEN_FEATURE_LIST$, to track the features that your end users select during install and uninstall. A similar set of variables exists ($CHOSEN_INSTALL_FEATURE_LIST$, $CHOSEN_INSTALL_FEATURE_NUM$, $CHOSEN_INSTALL_FEATURE_n$, and $FEATURE_UNINSTALL_LIST$). However, you can use the CHOSEN_FEATURE set of variables at install and uninstall by specifying features? short names, which are not localizable and thus serve as consistent IDs, regardless of the locale in which the installer or uninstaller is running. |
| $CHOSEN_INSTALL_SET$ | If Choose Product Features is enabled, this variable holds the short name of the install set chosen by the end user. If the end user chose to customize the install, this variable holds the string CUSTOM. |
The following is an example of using $CHOSEN_FEATURE_LIST$ in a Rule. If one had a project that contained three features (Feature_A, Feature_B, and Feature_C), and one wanted a Panel to only be displayed when Feature_C is a chosen Product Feature, the following Rule can be used:
$CHOSEN_FEATURE_LIST$ contains Feature_CNote that "Feature_C" is the short name of the feature. Since $CHOSEN_FEATURE_LIST$ contains a comma-separated list of all of the Product Features that were selected by the user, the Panel in question will only be displayed to the user when Feature_C is selected as a chosen Product Feature.
Additional Information
Assigning Files to FeaturesWas this helpful?
Related Articles
Snow’s Approach to Product Upgrades 4Number of Views Custom Actions sequence incorrect in InstallShield Express. 3Number of Views Canceling a Suite Install Does Not Interrupt the Install Right Away 3Number of Views Automation Interface: How to Change the Package GUID of all the Packages Included in a Suite Project 4Number of Views Sequence A Custom Action In A Merge Module 7Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago