I have been trying to find the cause of the problem in my script - to no avail.
I have a script that works well. But now I want to add to it a custom page that prompts the user to select a folder. Here is the function for that page:
The custom page is simply inserted between the version checking (custom) page and the MUI_PAGE_INSTFILES.
Again, when I comment out the Page custom line, the script works and finishes fine.
But with the Page custom code, the script never reaches the finish page!
This is beyond me. Clearly there is something wrong that I am doing in the custom page function (PageDirSelect). But what is it?
That function is so simple... I am lost.
Any help, clue or insight would be deeply appreciated.
Thanks!
P.S. Is it possible that I need a leave function for this custom page? Must I have a leave function even when a page is that simple? (if so, why?)
I have a script that works well. But now I want to add to it a custom page that prompts the user to select a folder. Here is the function for that page:
PHP Code:
Var varSelectedFolder ; global var - defined before any section, page or function
LangString PAGE_TITLE ${LANG_ENGLISH} "Title"
LangString PAGE_SUBTITLE ${LANG_ENGLISH} "Subtitle"
Function PageDirSelect
!insertmacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
nsDialogs::SelectFolderDialog /NOUNLOAD "Select Folder" "$DOCUMENTS"
Pop $varSelectedFolder ;where selected folder string is returned
; Check A Folder Has Been Selected
${If} $varSelectedFolder == "error"
MessageBox MB_OK "You must select a folder a folder. Aborting."
Abort ; Cancel Installation
${Else}
${EndIf}
nsDialogs::Show
FunctionEnd
PHP Code:
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
Page custom PageReinstall PageLeaveReinstall
!endif
Page custom PageDirSelect
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
But with the Page custom code, the script never reaches the finish page!
This is beyond me. Clearly there is something wrong that I am doing in the custom page function (PageDirSelect). But what is it?
That function is so simple... I am lost.

Any help, clue or insight would be deeply appreciated.
Thanks!
P.S. Is it possible that I need a leave function for this custom page? Must I have a leave function even when a page is that simple? (if so, why?)
Comment