Skip to content
⌘ NSIS Forum Archive

How to untick items?

5 posts

cirerita#

How to untick items?

Hi,

I'm using HM NIS editor to create my installation file; it allows you to list the items to be installed and, by default, they're all ticked. You can untick them by manually hitting the mouse button. Would it be possible to include an option saying something like "Untick all" which would untick all the items to be installed?
Animaether#
Just edit the source and make sure that...
Section "SectionName"
# .. code here ..
SectionEnd 
...becomes...
Section /o "SectionName"
# .. code here ..
SectionEnd 
The /o means 'optional', and makes that component unchecked by default.
Note that it's a good idea to at least have 1 component checked by default - if not read only - as otherwise no component is selected for installation 😉
cirerita#
thanks, that works, indeed, but I was looking for an option where the user could check/unckeck all the items by clicking the mouse during the installation process... is that possible?
Animaether#
Ahhh... Yes, you need to place them in a parent sectiongroup :

# /e makes sure it's expanded by default
SectionGroup /e "SectionGroup Title"
  Section "Section 1 Title"
    # code here
  SectionEnd
  Section "Section 2 Title"
    # code here
  SectionEnd
SectionGroupEnd