I have a function
Function installDll
...
EndFunction
I have some sections :
I would like call the function installDll once time if at least one of sections { a, b, c, d} is selected.
You could call your function from each concerned section and use a variable as a flag to know if the function has already been called:
!include "LogicLib.nsh" ;used for ${if} constructs
Section "A"
Call installDll
SectionEnd
Section "B"
Call installDll
SectionEnd
Section "C"
Call installDll
SectionEnd
Section "D"
Call installDll
SectionEnd
Section "Other"
;... do not call the function
SectionEnd
Var instFlag
Function installDll
${ifThen} $instFlag = 1 ${|} goto skip ${|}
StrCpy $instFlag 1
;... the rest of your function
;the following label is the last statement of the function
skip:
EndFunction