cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ashish123
Level 3

custom setup

how to use checkbox to select features and its sub features instead of its default look in basic MSI project. please tell me what are the changes to be made in the dialog or which property has to be set to achieve this?:confused:
Labels (1)
0 Kudos
1 Reply
Nick_Umanski
Level 7

What you are asking to do is not easy to achieve. I've done just this in a lot of my projects as I hate the standard MSI Custom dialog with the Advertise option. But it is a pain as the years tick by and you are asked to add new features, take out old, condition some out for certain languages or platforms. Think about those things before you jump in, especially if one of your languages is going to be right to left like Arabic.

What you have to do is design your own CustomSetup Dialog and insert it into your UI sequence in the same place, getting the Next and Back button functionality for a modify as well as a fresh install sorted out for all dialogs affected.

Now each checkbox you add for each feature, must be associated to a property. One will be offered by default. Change the name to an approapriate value and then blank the default value it sets - which is '0' - set it to null (empty).

Lets say you have three features, 'Client', 'ClientSubFeature' and 'Server' with properties 'CLIENT', 'CLIENTSUBFEATURE' and 'SERVER'. Back at the CustomSetup dialog goto the behaviour\Next button and add the following events.

AddLocal ALL 1
Remove Client CLIENT<>1
Remove ClientSubFeature CLIENTSUBFEATURE<>1
Remove Server SERVER<>1

Now if you have sub features, you have to modify the Conditions tab on each of the checkbox controls to ensure, you can't select a subfeature with out the main feature and if you deselect the main feature, the subfeatures are taken out too.

So on your 'ClientSubFeature' checkbox you might have the following conditions:

Disable CLIENT<>1
Enable CLIENT=1

And on the 'Client' checkbox you will need the following EVENTS:

[CLIENTSUBFEATURE] 1 CLIENT=1 //Optional - this will cause the subfeature to be automatically selected when the feature is.
[CLIENTSUBFEATURE] [BLANK] CLIENT<>1
[CLIENTSUBFEATURE] [CLIENTSUBFEATURE] 1

Note in the above example I use a property called 'BLANK' which is as the name suggests, null. The final line in the above example causes the CLIENTSUBFEATURE checkbox to refresh when the CLIENT checkbox is changed.
0 Kudos