I am in the process of adding Silent Install support to my installer. I added some functions to allow me to pass the parameter: /COMPS= to my installer. I have 3 sections (for each component), so /COMPS=1 would just install the first section where as /COMPS=12 would do the first two. This works just fine. However if I leave out the /COMPS= parameter or don't set a value for it, the installer runs through, but skips all the sections, which is also fine.
Here is my question: I have the below code in place, but when running the installer in Silent mode, with no components selected (/COMPS=), the message box below does not pop up. I would expect that I would have to deal with this message box with either the IfSilent or /SD commands. I even tried putting a dummy messagebox at the start of the ComponentsLeave function, but it does not come up either. Is this function omitted during a silent install?
Thanks.
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE "ComponentsLeave"
!insertmacro MUI_PAGE_COMPONENTS
Function ComponentsLeave
SectionGetFlags "${SEC01}" $0
StrCmp $0 1 End
SectionGetFlags "${SEC02}" $0
StrCmp $0 1 End
SectionGetFlags "${SEC03}" $0
StrCmp $0 1 End
MessageBox MB_OK|MB_ICONINFORMATION "You must select at least one component."
Abort
End:
FunctionEnd