Archive: Weird problem with Select/Unselect sections


Weird problem with Select/Unselect sections
Hi guys,

there are 2 scripts attached "test1.nsi" and "test2.nsi" in the ZIP file.
The only difference between them is the order in which are placed the first 2 sections in each script.
test1 -> .NET section first, USB driver section second
test2 -> USB driver section first, .NET section second

Here is my problem (using NSIS 2.23):
although the diagnostic message boxes show that both 2 sections were programmatically unselected in .onGUIInit function there is ALWAYS ONLY the 1st section UNSELECTED on the components page whereas the 2nd section is ALWAYS SELECTED which is obviously wrong as it should be UNSELECTED AS WELL.

I really have no idea what is causing this strange behaviour.
Can anyone try these scripts and give me a hint what is wrong here?

P.S. There is real file/version checking implemented which works for me as I have .NET Framework 2.0 & FTDI USB drivers actually installed on my OS. You can try to replace these check mechanisms to something else (DLL, random file, whatever) if you need to.


S_DotNet and S_USBDriver are defines. Pass ${S_DotNet} and ${S_USBDriver} to SelectSection and UnselectSection.


Thanks, so it was my stupidity again :hang:
Next time I have to study examples more carefully :up: