Archive: Flags


Flags
Someone can help me Please:
When Im at "the components to install" one of the section "checks Boxes" arealready checked.
I want it so that nothing is checked so that the client has to pickthe file format that he/she wants.
Im attaching the script ...what I did wrong.


Sorry the attachment


Can you also attach the script with the Sections, please :)


Not sure if this is the correct syntax but;

!define SECTION_OFF 0xFFFFFFFE #define once

SectionGetFlags ${MYSec} $R0
IntOp $R0 $R0 & ${SECTION_OFF}
SectionSetFlags ${MYSec} $R0
-Stu


Sorry wrong attachment......


Just try my code but just in the .onInit function.

-Stu


with your code I have the followings error:
!define: "SECTION_OFF" already defined
And when Im deleting the "!define: "SECTION_OFF""""
All section are under the subsection DST


Ok, if you are using latest CVS version, then your sections should be like this to be unselected by default:

Section /o "section label" "secid"

-Stu


Ok here is the proper solution:

In your .onInit function, replace the 1st bit:
SectionGetFlags ${secDST} $0
IntOp $0 $0 | ${SF_SELECTED}
SectionSetFlags ${secDST} $0

With:
SectionGetFlags ${secDST} $0
IntOp $0 $0 & ${SECTION_OFF}
SectionSetFlags ${secDST} $0

That works for me :)

-Stu


Its working ...it was my mistake ,I left a code before.
What you expect from a newbie :)
thank you appreciate your help.