Registry Value Conditional on Feature Installation - Advanced Installer Community
steven.wood
Posts: 2
Joined: Fri Jan 05, 2018 4:45 pm

Registry Value Conditional on Feature Installation

I need to have a registry value that is 0x0 if a feature is not installed and 0x2 if a feature is installed.

Can this be done?

Steve
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry Value Conditional on Feature Installation

Hello Steve and welcome to our forums,

Yes, this can be done. For instance, you can write your own VBS custom action to check the feature install action state using the "Session.FeatureRequestState property" and depending on the result set an installer property (e.g. FEATURE_PROP) with the desired value. The custom action could be added as a custom action with sequence after "Install Execution Stage -> Preparing" action group and scheduled to run as immediate.

Then, in "Registry" page you can create a registry value whose value data is set to the formatted reference of the related property, i.e. [FEATURE_PROP].

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”