Archive: navigate through custom pages


navigate through custom pages
Hi,

I set up two custom pages. One for selecting the install mode (i.e. local or network) the second for entering extra information for network installation.
That means after the licence dialogbox I ask the user to tick a radio button on my first custom page, after that I want to check his/her choice and if network was selected then show a second custom page, if not just continue with the classical component page.
How to deal with?

*************** My Code *************************
;Install Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE $(MUILicense)
Page custom SelInstMode
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SelInstMode
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE SelInstMode_leave
!insertmacro MUI_PAGE_COMPONENTS

;--------------------------------
; Custom Page for Instalation mode i.e. Local or Network
Function SelInstMode

!insertmacro MUI_HEADER_TEXT "$(TEXT_SELINSTMODE_TITLE)" "$(TEXT_SELINSTMODE_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "SelInstMode.ini"
!insertmacro MUI_INSTALLOPTIONS_WRITE "SelInstMode.ini" "Field 1" "State" $LOCAL_INSTALL
!insertmacro MUI_INSTALLOPTIONS_WRITE "SelInstMode.ini" "Field 2" "State" $NETWORK_INSTALL
!insertmacro MUI_INSTALLOPTIONS_READ $LOCAL_INSTALL "SelInstMode.ini" "Field 1" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $NETWORK_INSTALL "SelInstMode.ini" "Field 2" "State"

FunctionEnd

;--------------------------------
; Function called when leaving the custom page SelInstMode
Function SelInstMode_leave

;Network installation was selected
intcmp '$NETWORK_INSTALL' '1' NEXT
call NetworkParameter

NEXT:

FunctionEnd


Into 2nd page's create function and before call InstallOptions to show the page, you may get users choice.
Depending on that, you're able to call abort to skip the page.