Archive: Selecting an Optional box in the Component Window


Selecting an Optional box in the Component Window
Greetings ... I have an optional Section which I would like to pre-select (check it) before presenting to the user?

My search on the forum has been un-successful so far! Thanks.


I am not sure of your question because without telling
the code to do something else, every section is selected
by default.


Section "Section one"
SectionEnd

Section /o "Section two"
SectionEnd


Section one is checked by default.
Section two is unchecked by default.

Adding /o makes it unchecked.

-MichaelFlya-

Selecting an Optional box in the Component Window
Thanks for your Reply; I should re-phrase my question.

I have a section (optional) by the specifying the switch ("/o"), like this code:

Section /o "!Save Current Database" -SEC01
<some code ...>
SectionEnd

My NSIS installer shows an un-checked box followed by "Save Current Database" after it.

I would like to place a check mark in this box before presenting it to the user. Is there a switch like above("/?") that accomplishes this or I need to code it in one of the sections?

Thank You.


Take away /o on your section and it will be done.

-MichaelFlya-


Optional Section
Hey Thanks Michael, your suggestion works like a charm.

I guess, I was looking for something involved ... like actually writing some code ... as the code junky I am.