I want disable a section as standard
I want disable a section as a default.
But the user should be able to enable the section.
How can I switch off the section as a default ??
Thanks
Peter
Archive: I want disable a section as standard
I want disable a section as standard
I want disable a section as a default.
But the user should be able to enable the section.
How can I switch off the section as a default ??
Thanks
Peter
!include "Sections.nsh"
Section "bla" SecName
SectionEnd
Function .onInit
Push $R0
SectionGetFlags ${SecName} $R0
IntOp $R0 $R0 - ${SF_SELECTED}
SectionSetFlags ${SecName} $R0
Pop $R0
FunctionEnd
The sections is always select with a checkbox !
The changes does not work !!
I dont know why !
Peter
Using the latest NSIS 2 version?
Any errors?
unselect
I am using 2.0b1
Peter
Did you add a define name to your section? Can you attach the full script?
xx
Thanks a lot ,
attached the file
Peter
No attachment?
xx
Sorry , but the I have problems with the attach !
May be the firewall !!
Section "Additional COLDSAW-Software" Section3 /Unchecked
WriteINIStr "$INSTDIR\config.ini" "modes" "picos_type" 2
StrCpy $8 'R2'
DELETE d:\DATABASE\${CUSTOMER}\MIDISSRV.INI
RENAME d:\DATABASE\${CUSTOMER}\MIDISSRV2.INI d:\DATABASE\${CUSTOMER}\MIDISSRV.INI
SectionEnd
Section "Additional COOLEX-Software" Section4 /Unchecked
WriteINIStr "$INSTDIR\config.ini" "modes" "picos_type" 3
StrCpy $8 'R11'
DELETE d:\DATABASE\${CUSTOMER}\MIDISSRV.INI
RENAME d:\DATABASE\${CUSTOMER}\MIDISSRV3.INI d:\DATABASE\${CUSTOMER}\MIDISSRV.INI
SectionEnd
; ******* 5 ***************************************************************************************
Function .onInit
Push $R0
SectionGetFlags ${Section3} $R0
IntOp $R0 $R0 - ${SF_SELECTED}
SectionSetFlags ${Section3} $R0
Pop $R0
Push $R0
SectionGetFlags ${Section4} $R0
IntOp $R0 $R0 - ${SF_SELECTED}
SectionSetFlags ${Section4} $R0
Pop $R0
Try this:
!include "Sections.nsh"
Section "Additional COLDSAW-Software" Section3
WriteINIStr "$INSTDIR\config.ini" "modes" "picos_type" 2
StrCpy $8 'R2'
DELETE d:\DATABASE\${CUSTOMER}\MIDISSRV.INI
RENAME d:\DATABASE\${CUSTOMER}\MIDISSRV2.INI d:\DATABASE\${CUSTOMER}\MIDISSRV.INI
SectionEnd
Section "Additional COOLEX-Software" Section4
WriteINIStr "$INSTDIR\config.ini" "modes" "picos_type" 3
StrCpy $8 'R11'
DELETE d:\DATABASE\${CUSTOMER}\MIDISSRV.INI
RENAME d:\DATABASE\${CUSTOMER}\MIDISSRV3.INI d:\DATABASE\${CUSTOMER}\MIDISSRV.INI
SectionEnd
Function .onInit
Push $R0
SectionGetFlags ${Section3} $R0
IntOp $R0 $R0 - ${SF_SELECTED}
SectionSetFlags ${Section3} $R0
SectionGetFlags ${Section4} $R0
IntOp $R0 $R0 - ${SF_SELECTED}
SectionSetFlags ${Section4} $R0
Pop $R0
FunctionEnd
Thanks Joost
Peter