Registry : Same key, two values - Advanced Installer Community
Tristan Kahn
Posts: 4
Joined: Mon Jul 03, 2017 8:18 am

Registry : Same key, two values

Hi,

I want to create two exclusives features. How can i do that ?
Each feature need to create same registry key, but each with different values.
How can i do that too ?

Best regards.

Tristan
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Registry : Same key, two values

Hello,

This can be done by following these steps:

1.Go to "Registry" page and create a new key with a new value. In the data field you should enter a formated reference to a property, for example "[VALUE]". This property will be resolved at install time according to the user's feature selection.

2.Go to "Dialogs" page and create a new dialog. Create a new Radio Button group control with two radio buttons on it (one for each of the two features). The property associated to this radio button group will be "RADIOBUTTONGROUP_1_PROP". You could change the text of these buttons from the "Display"-"Text" section in the Properties pane. You could also change the values for the radio buttons to, for example, "Feature1" and "Feature2".

3.Go to "Organisation" page and create two new features - "Feature1" and "Feature2". You should move the component containing the registry value to one of the features. Then you should rigt click on the component and select "Share", with the second feature.

You should condition their installation in the following way:
Feaure1 : Installed, Not installed if:

Code: Select all

RADIOBUTTONGROUP_1_PROP="Feature2"
Feaure1 : Installed, Not installed if:

Code: Select all

RADIOBUTTONGROUP_1_PROP="Feature1"
4. Go to "Dialogs" page, to the dialog you've created earlier, select the "Next" button and create two set installer property publish events configured in the following way:

First one:

Code: Select all

Property :VALUE
Argument: the registry value you want for the first feature
Condition:RADIOBUTTONGROUP_1_PROP="Feature1"
Second one:

Code: Select all

Property :VALUE
Argument: the registry value you want for the second feature
Condition:RADIOBUTTONGROUP_1_PROP="Feature2"
Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Tristan Kahn
Posts: 4
Joined: Mon Jul 03, 2017 8:18 am

Re: Registry : Same key, two values

Hi

Thanks for the reply
I will try.

Regards

Tristan
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Registry : Same key, two values

Hello,

You are welcome! Please let me know if you have any other questions!

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”