Archive: Section Hierarchy and Calls Help


Section Hierarchy and Calls Help
Ok... There are going to be many ways to do this, but just looking for feedback on how others would do it...

I have an installation that I am building... There are going to be 3 parts or sections, unless a better way is determined.
1 hidden, sets up logging and other environment stuff
1 visible component and selected by default
1 visible component and is optional, unchecked by default

Then at the same time, if the installer is ran silent it will run the default item and check to see against existing version if it needs to upgrade the optional component.

I see this as 3 sections, but can you put conditionals on sections themselves.. or changed the selected sections based on something like ${Silent}.

Just looking for ideas and if there are better ways of completeing this task.

Thanks,

Squirre1


Unless I got you wrong, you can use Memento to remember section selections, how to use it is here: http://nsis.sourceforge.net/Include/Memento.nsh and it should work during a silent install as well.


Just check whether the files and/or registry keys for the optional components exist, and then set the section to selected using the macros in sections.nsh. You can do this in .onInit, for example.