Archive: SetCurInstType for multiple InstType


SetCurInstType for multiple InstType
I have 5 install types.
4 of them is self excluding, but N5 can be added to any of first 4.
I was able to do this in GUI, by using .onSelChange function and all works well.

Now I am trying to do it in silent installer.
I can set any first 4 by calling:
SetCurInstType from 0 to 3, but how can I set 0 + 4 for example?
I tried calling
SetCurInstType 0
and then:
SectionSetFlags ${promo} ${SF_SELECTED}
Where promo my fifth install type.
It does not work. Only if I call:
SectionSetFlags for all Section inside Section group I get fifth group installed.

is it only way? Since I generate my nsi file I don't realy know all section inside install type. I am trying to avoid remebering it and generating function that set every section flag in this Install type. It's doable, just want to know is there are easy way?


I don't understand. Is ${promo} a group? Are you selecting it using SectionSetFlags in .onSelChange?


${promo} is group. My fifth one that I want to add to first.

Problem I can call SetCurInstType 0, but how to add my promo group to it?
SectionSetFlags does not work on group. Only way to add promo group is to call SectionSetFlags on every section in this group.

My question: "Is ther easy way to select 2 install type?"
Right now I see only one option, select first install type + add all section from second group by callin SectionSetFlags .


You enumerate all the sections, use SectionGetInstTypes to find out which sections belong to either installation type and select those that do belong.


Great thanks.