Skip to content
⌘ NSIS Forum Archive

Section: min one selected

7 posts

MP_chefkoch#

Section: min one selected

hi

can anyone tell me an example syntax, for my problem.
I have a SubSection calling 'language' and some setions for example 'German' and 'English'.

Now minimum is one selected Section, but it could be also 2 selected sections.

thx
hanshans
VegetaSan#

Section "language"

Subsection "German"
Setoutpath "$PROGRAMFILES"
file "C:\german.lang"
SubsectionEnd

Subsection "English"
Setoutpath "$PROGRAMFILES"
file "C:\english.lang"
SubsectionEnd

SectionEnd
this should work.
MP_chefkoch#
@Vegeta San
Error: command SubSection not valid in section
This tells me NSIS, i know the error and i have the corrected version, but this is not what i need

@yathosho
i know this example but there i have only one selected -> then i get german OR english,
but i need german AND english

but although thanks for your help guys

These are the possibilities, I want to have to enable:
german AND english
ONLY german
ONLY english

BUT NOT all disabled.

I need more help.
hanshans
VegetaSan#
oops. I switched them. sorry 😁


Subsection "Languages"

Section "German"
Setoutpath "$PROGRAMFILES"
file "C:\german.lang"
SectionEnd

Section "English"
Setoutpath "$PROGRAMFILES"
file "C:\english.lang"
SectionEnd

SubsectionEnd
Yathosho#
i posted the one-section example not that because you can adapt it, but because you can customize it easily to fit your needs.