How to show only the features with associated CAB files in the selection tree?

Suppose your application has plugins which are different from one client to another. This article demonstrates how to dynamically change the installed features depending on the package content you'll be delivering.

In this scenario, we'll assume you already organized each plugin with its dependencies in their own feature.

Here are the steps you need to follow:

1. Create a new Professional or above project type.

2. Go to Registry Page - Installer Project, create a new registry value somewhere under "Current user/Local machine" hive and set its Data field to:

[AI_DISABLED_FEATURES]

3. Go to Organization Page and share the previous registry value's component in all the features.

4. Go to Builds Page > Configuration tab and in the "Archive" section enable "Archive installation into CAB files" > "One CAB archive per feature".

5. Go to Search Page and add two registry searches named AI_DISABLED_FEATURES. One search should be in HKCU, the other in HKLM and both should look for the registry value from step two.

NoteThese searches are used to synchronize the functionality in maintenance mode. If you have several builds you should define the same pair of searches for each build.

6. Finally, go to Custom Actions Page and add "Collect features without CAB" and "Disable Features" predefined custom actions.