Skip to content
⌘ NSIS Forum Archive

Not install portions of a section?

4 posts

drsprite#

Not install portions of a section?

Is there a way to not install portions of a section if another section isn't selected?

For example I have 4 sections

1) core files
2) optional exe
2.1) desktop shortcut (for exe)
3) start menu (for url, uninst, exe)
4) quick launch (for exe)

Is there a way that if section 2 is unselected to remove the optional exe shortcuts from within section 3 and 4?Since those sections are doing other things, I don't want to SubSection them with 2.

Apologies if I sound confused. I think I need an if statement or something?

Thanks for the help
drsprite#
Thanks. I'm reading the FM, and it's confusing me more. Do I remove the CreateShortCut from the Section and add it to a function?
MSG#
No, just use SectionGetFlags to check whether or not the optional exe was selected. Then depending on that, create the shortcuts or not.