Archive: Dynamic Sections


Dynamic Sections
Is there anyway to change the sections based on certain conditions.

Basically Im trying to create an installer that will go on the CD. One of the sections will let the user copy lots of the files from the CD to their hard disk (this I can do). But if the installer has been moved from the CD it wont be able to find the files and I dont want it to show the section.

I tried using IfFileExists, but it needs to be called within a section. Can anyone think of a decent solution?


With Nsis 1.98 you can do this in the .onInit function along with using the SetSectionFlags to hide it on Initialization.