View Single Post
Old 9th November 2004, 11:06   #6
sfranklin
Junior Member
 
Join Date: Jul 2004
Posts: 40
thanks, with a little pointer in the right direction i managed to sort this out.

For anyone else who wants to do the same this is how i did it:

In this custom page, field 2, is the checkbox

page custom CustomPage1 ValidateCustomPage1

Function RemoveDongle
!insertmacro MUI_INSTALLOPTIONS_READ $R0 ".\CustomPage1 .ini" "Field 2" "State"
FindWindow $R1 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $HWNDPARENT 1
EnableWindow $R1 $R0
!insertmacro MUI_INSTALLOPTIONS_DISPLAY ".\CustomPage1.ini"
FunctionEnd


Function ValidateCustomPage1
!insertmacro MUI_INSTALLOPTIONS_READ $R0 ".\CustomPage1.ini" "Field 2" "State"
FindWindow $R1 "#32770" "" $HWNDPARENT
GetDlgItem $R1 $HWNDPARENT 1
EnableWindow $R1 $R0

!insertmacro MUI_INSTALLOPTIONS_READ $R2 ".\CustomPage1.ini" "Settings" "State"
StrCmp $R2 "2" +1 validate
Abort

validate:
StrCmp $R0 "0" +1 ok
Abort
ok:
FunctionEnd

thanks again
sfranklin is offline   Reply With Quote