LrngToFly
Posts: 17
Joined: Fri Nov 03, 2017 6:28 pm

Is there a tutorial or sample aip that demonstrates Feature selection?

Hello-

I am wanting to create an install kit that displays to the user a screen that lets them select via a set of radio buttons one set of files from a selection of four possibilities. Then the set of files that are installed will be based on which radio button entry they selected.

Might there be a tutorial or sample AIP file that demonstrates how to do this?

Thanks!
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Is there a tutorial or sample aip that demonstrates Feature selection?

Hello,

This is not exactly what you've been asking for (since it does not use radio button controls), but this can be achieved pretty easily by using our "OptionalFeatsDlg" dialog.

The above mentioned dialog displays all the features you have created in "Organization" page and will install them based on user selection.

All you need to do is to go to "Dialogs" page and add it by using the "Add Dialog" button from the toolbar.

Hope this helps.

If this is not enough, I can create a sample project for you which does what you have asked. Just let me know if you need it.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
LrngToFly
Posts: 17
Joined: Fri Nov 03, 2017 6:28 pm

Re: Is there a tutorial or sample aip that demonstrates Feature selection?

Thanks Catalin for your help.

I've added OptionalFeatsDlg to my project. In the provided example I can't figure out how to add additional entries to the Quick Selection List. I see the button with the three dots next to "Text" in the Properties window. Then a dialog labeled "Edit Control Text" comes up where I can "Insert References To" "Installation file:" "Folder:" and "Windows Installer property".

Can you talk me through this a bit? Would I use this, or something else?

Thanks! Andy
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Is there a tutorial or sample aip that demonstrates Feature selection?

Hello Andy,

Unfortunately, the "QuickSelectionList" from the "OptionalFeatsDlg" cannot be modified.

In this case, I believe the best would be to create your own custom dialog.
Can you talk me through this a bit?
Sure thing, let's work this out together.

First of all, let's create two test files: first.txt and second.txt

Add these files in the "Files and Folders" page in Advanced Installer.

Now please go to "Organization" page. There, please create two features, i.e.: first and second. After doing so, please move the component of each file to its appropriate feature. In the end, it should look something like this:

features.png
features.png (31.67 KiB) Viewed 4242 times

After doing so, let's create our custom dialog in which the user can decide what features will be installed. To do so, please go to "Dialogs" page --> select "WelcomeDlg" and click on the "New dialog" button from the toolbar.

Before we further proceed, it is important to note one fact here. It is important to know which controls we will use to control the installation of the features.

For instance, a radio button group control will let the user select only one feature to be installed. If a radio button group control contains two radio button controls, the logic behind it is:

Code: Select all

Either A or B
It cannot do both A and B.

On the same log, the checkbox control is quite the opposite. It will allow your users to select multiple features at the same time. The logic behind it is as it follows:

Code: Select all

only A
only B
both A and B
none
Hope the difference is a bit more clear now.

Let's consider the checkbox example for now.

In our case, we will need two checkbox controls. To add them, select the earlier added dialog and press on the "Control Toolbox" button from the toolbar. This will pop-up a control toolbox from which you can select which controls you want to add to your dialog. From that, let's add two checkbox controls. It should look something like this:

checkbox.png
checkbox.png (417.93 KiB) Viewed 4242 times

As you can see, the checkbox has three main attributes:

- text --> for instance, here you can change the name so it is more intuitive for the user what he is choosing. For instance, you can use the feature name here.

- property name --> this property is used to store the value of the checkbox. We will use this to condition the installation of our feature.

- value --> the value stored in the above mentioned property:.
In our example, we will have something similar to this:

CHECKBOX_1_PROP = "CheckBox" ==> the checkbox is checked

CHECKBOX_1_PROP = "" ==> the checkbox is NOT checked


Now, in order to link this to our features, we can proceed as it follows:

- go to "Organization" page

- select the "first" feature

- under "Installation behavior", set the default to "Not installed" and in the "Installed if" field, please insert a condition as it follows:

Code: Select all

CHECKBOX_1_PROP = "CheckBox"
installationbehavior.png
installationbehavior.png (81.79 KiB) Viewed 4242 times

This way, the feature will only be installed if the checkbox was checked in our dialog.

Similar to this, you can add as many checkbox controls as you want.


Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
LrngToFly
Posts: 17
Joined: Fri Nov 03, 2017 6:28 pm

Re: Is there a tutorial or sample aip that demonstrates Feature selection?

Awesome- thanks so much!

I do want Radio buttons- the user has to select which "platform" for which they're installing the files, and it can be only one.

It is really cool that there is a bit of "Intellisense" or something like that- I wasn't sure what the condition would be for the "Installed if:" field under Feature Properties in the Features and Components under Organizatio for radio buttons. I typed my button group name and then the text of the buttons I added popped right in.

I didn't see your post until late in my day. I've quickly walked through it- I need to clean some things up and then see how it works, but a big giant THANK YOU for walking me through that. I'm not sure I would have figured it out on my own without some head banging.

Thanks again! Andy
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Is there a tutorial or sample aip that demonstrates Feature selection?

You are always welcome, Andy!

It is always my pleasure to help.

I am really glad you got this working.
It is really cool that there is a bit of "Intellisense"
Yes, that is indeed helpful.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”