trouble disabling some buttons
I am creating an auto-installer which is designed to operate without user interaction. I want to make it so the user can cancel on any page, but cannot hit the next or back buttons. I've been successful at disabling the Back button for all of the pages, and the next button for 4/7 of the pages. I can't seem to disable the "I agree" button for the License page, the "Install" button on the Start Menu Folder page, or the "Next" button on the directory page. Some of the relevent code is copied below. I have also tried many other control ID's, but havent had any success. I tried Resource Hacker and AutoIt as well... any ideas?
from code:
; License page
!define MUI_PAGE_CUSTOMFUNCTION_Pre License_PrePage
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SkipPage
!insertmacro MUI_PAGE_LICENSE "..."
...
; Directory page
!define MUI_PAGE_CUSTOMFUNCTION_Pre Directory_PrePage
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SkipPage
!insertmacro MUI_PAGE_DIRECTORY
...
; Start Menu page
!define MUI_PAGE_CUSTOMFUNCTION_Pre StartMenu_PrePage
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SkipPage
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
...
Function License_PrePage
StrCmp $AutoInstall "true" 0 end
StrCpy $R5 "250"
GetDlgItem $4 $HWNDPARENT 1
EnableWindow $4 0
GetDlgItem $4 $HWNDPARENT 3
EnableWindow $4 0
end:
FunctionEnd
...
Function Directory_PrePage
StrCmp $AutoInstall "true" 0 end
StrCpy $R5 "250"
GetDlgItem $4 $HWNDPARENT 1
EnableWindow $4 0
GetDlgItem $4 $HWNDPARENT 3
EnableWindow $4 0
end:
FunctionEnd
...
Function StartMenu_PrePage
StrCmp $AutoInstall "true" 0 end
StrCpy $R5 "250"
GetDlgItem $4 $HWNDPARENT 1
EnableWindow $4 0
GetDlgItem $4 $HWNDPARENT 3
EnableWindow $4 0
end:
FunctionEnd
Any help would be greatly appreciated!