Archive: Allow Next on License screen and detect?


Allow Next on License screen and detect?
My installer needs to display 2 EULA's. 1) for the open source software it includes and 2) EULA for the company. I'm currently doing this all just fine. Now the installer needs to change.

If the user agrees to the open source software, proceed; if they disagree, quit. That's done and easy with the MUI_PAGE_LICENSE already. The problem I'm running into is for the 2nd EULA screen. If the user agrees to the companys EULA, proceed; if the user disagrees then only install the open source software.

1) How do I get the MUI_PAGE_LICENSE page to allow clicking Next/I agree (either using checkbox/radio buttons) regardless? I found this old post but the question really wasn't addressed.

2) How can I detect what button the user clicked from a previous dialog? Probably something with GetDlgItem right?


!include nsdialogs.nsh
function licshow
GetDlgItem $0 $hwndparent 1
EnableWindow $0 1
functionend

function licleave
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 0x40A
${NSD_GetState} $0 $0
${If} $0 <> 0
messagebox mb_ok Checked #TODO store state in some global
${Else}
messagebox mb_ok NotChecked #TODO store state in some global
${EndIf}
functionend



!define MUI_PAGE_CUSTOMFUNCTION_SHOW licshow
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE licleave
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "${__FILE__}"

Anders: You rock! Exactly what I was looking for. Plus learned something new with the MUI_PAGE_CUSTOMFUNCTION use.