Hi,
I am trying to change the installation type of a section in a section-group, but it seem that the function SectionSetInstTypes doens't work correctly for sections in a group. For section outside a group it work fine.
This is a script example:
----------------------------
Name "MyTest 1"
OutFile "Setup.exe"
InstType "Full"
InstType "Standard"
InstType "Minimal"
Page components
Function .onInit
;Disable section SEC02 for install type "Minimal"
SectionSetInstTypes SEC02 3
FunctionEnd
SectionGroup "Test"
Section "Section01" SEC01
SectionIn 1 2 3
SectionEnd
Section "Section02" SEC02
SectionIn 1 2 3
SectionEnd
SectionGroupEnd
-------------------------
With this script the section SEC02 is not disabled with the installation type "minimal".
If I put the sections outside the group, than it work correctly. It is disabled with the installation type "minimal".
I need this function to enable for the install type "Standard", in function of the selected language, some sections (like manuals,...).
What is wrong?
Thanks,
LoSini
SectionSetInstTypes doesn't word with SectionGoup
3 posts
try SetCurInstType SEC02 2, the section index starts with zero. you also need to change SectionIn to "1 2" (without 3), otherwise all sections are in all insttypes.
I see my error,
the parameter SEC01 in the line 'Section "Section01" SEC01' is not a string that is stored as a reference but the name of the symbol where the index of the Section01 will be stored.
So, this is the working script:
------------------------------
Name "MyTest 1"
OutFile "Setup.exe"
InstType "Full"
InstType "Standard"
InstType "Minimal"
Page components
SectionGroup "Test"
Section "Section01" SEC01
SectionIn 1 2 3
SectionEnd
Section "Section02" SEC02
SectionIn 1 2 3
SectionEnd
SectionGroupEnd
Function .onInit
SectionSetInstTypes ${SEC02} 3
FunctionEnd
------------------------------
Sorry,
LoSini
the parameter SEC01 in the line 'Section "Section01" SEC01' is not a string that is stored as a reference but the name of the symbol where the index of the Section01 will be stored.
So, this is the working script:
------------------------------
Name "MyTest 1"
OutFile "Setup.exe"
InstType "Full"
InstType "Standard"
InstType "Minimal"
Page components
SectionGroup "Test"
Section "Section01" SEC01
SectionIn 1 2 3
SectionEnd
Section "Section02" SEC02
SectionIn 1 2 3
SectionEnd
SectionGroupEnd
Function .onInit
SectionSetInstTypes ${SEC02} 3
FunctionEnd
------------------------------
Sorry,
LoSini