Archive: Component section dynamically on or off at runtime?


Component section dynamically on or off at runtime?
Can a section of the components page be turned on or off dynamically (such as during .onInit)?

Sorry if this has been asked and answered previously .... I didn't find an answer.

I've developed an app that needs at least one "resource" to be useful. There is a "StarterKit" that includes a simple resource that will let the end-user get up and running.

I want to be able to detect if this resource has already been installed, and then Check or UnCheck the Section accordingly.

If SimpleResource detected:
O Install SimpleResource

If SimpleResource not detected:
X Install SimpleResource


Use the macros in Sections.nsh. More specifically, you'll need SelectSection and UnselectSection.


Thx!

Here is a code example I put in the nsis wiki

http://nsis.sourceforge.net/IfFileEx..._Section_Flags

Ok?