empezar
27th September 2003 13:54 UTC
if Section = enabled?
is there any way to check whether a section has been checked or not?
right now I am creating a file and doing an IfFileExists.. but that is not very effective.
I have skimmed through the documentation but didn't see anything, and I really don't have time to read the entire thing.
Afrow UK
27th September 2003 14:49 UTC
!define SF_SELECTED 1
Function myfunc
SectionGetFlags ${secid} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
StrCmp $R0 ${SF_SELECTED} 0 +2
MessageBox MB_OK "Is selected!"
FunctionEnd
That should work.
secid is set like so: Section "section name" secid
-Stu
empezar
27th September 2003 15:21 UTC
erm, I didn't get all that so well...
I'll explain more closely:
Section "test"
SetOutPath "$INSTDIR"
File "test.exe"
SectionEnd
Section "test2"
; this is where I have problems
if Section test = enabled "" +2
createshortcut blablabla...
SectionEnd
this of course does not work, but I think you at least get the point
Afrow UK
27th September 2003 17:03 UTC
!define SF_SELECTED 1
Section "test" sectest
SetOutPath "$INSTDIR"
File "test.exe"
SectionEnd
Section "test2"
SectionGetFlags ${sectest} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
StrCmp $R0 ${SF_SELECTED} 0 +2
createshortcut blablabla...
SectionEnd
-Stu
empezar
27th September 2003 20:18 UTC
thank you.