Archive: Pre-select items on selection page


Pre-select items on selection page
I'm using the "one-section" code in the samples directory, and I need to pre-select different options depending upon the current configuration. I suppose I could re-order the list so the correct box is at the top, but I'd rather leave the list in the order I have it, and select the correct box.

Any ideas how I go about doing this? (I'm using the Modern UI, if it makes a difference.)

Dave in PNG


Simply add or remove the /o switch as needed. If a section has the /o switch it will be unselected by default. Don't forget to copy the right section into $1 in .onInit too.

If you're not using b4 then simply change .onInit to unselect the right sections. Just change the section ids in there.


Thanks for the great answer. Sorry to waste bits on so simple a question.

I'm amazed at all the functionality built into NSIS. It's awesome.