Archive: Optional sections conundrum


Optional sections conundrum
Here's the basic situation, I've had this problem for a while and have never really had a good solution, so I figured I'd finally ask on here.

Ok, I have an installer with multiple optional sections. However, the user must select at least one of them. By default I have them all selected, but the user can choose to deselect any of them. At least one must be selected for a proper installation, though, just doesn't make any sense otherwise. So what I've always done is have a bit set for each of the section, and then add that value in the section heading. Then in the main section, "" I would check to see if that value was 0, if it was then they didn't select anything and I would throw up a messagebox and quit the installer.

What I would like to do, though, is something slightly more intelligent. I'd like to be able to detect that they haven't selected any options earlier, and then simply keep them at the screen until they select to install at least one of the items. I tried using the .onNextPage and .onPrevPage, but the options aren't being set until it hits the section commands, and those aren't until after all those screens.

So does anyone have an idea about a better way to handle this situation?

Thanks.


This is a problem already discussed many times on the forum.
No, it's not possible to do it otherwise using the current NSIS, but you could try to use InstallOptions or a DLL instead. Or modify the source...

Search the forum for past threads about this subject!

-Hendri.