angelaevans
Posts: 1
Joined: Mon Sep 29, 2025 9:43 am
Contact: Website

How to conditionally install files and registry keys based on selected MSI feature?

Hi everyone,

In my MSI project, I have several optional features (like Core, PluginA, PluginB). What I want is:

If the user selects PluginA, only the related files and a registry entry should be installed.

If the user selects Plugin B, then its files and registry entries should be applied.

If none of the optional plugins are selected, only the core files should be installed.

I’m trying to figure out the best way in Advanced Installer to conditionally install both files and registry values based on the feature selection at install time.

Should I rely on Component conditions, or is there a more direct way to tie registry entries and files to specific features?

Any guidance or best practices would be really appreciated.

Thanks!
Liviu
Posts: 1325
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: How to conditionally install files and registry keys based on selected MSI feature?

Hello and welcome to our forums,

If you have multiple files and registry keys, the best solution to allow the user to choose whether or not to install the feature is to use our predefined OptionalFeatsDlg dialog or use a a custom feature selection dialog.

In your case, just add the desired resources to PluginA and PluginB.
If none of the optional plugins are selected, only the core files should be installed.
For this, add the resources to the MainFeature.

In the Organization page --> Feature Properties you can select the option to hide a feature from the dialog.
feature not displayed.png
feature not displayed.png (42.63 KiB) Viewed 61 times

Let us know if you have any questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”