leave function not called with custom page
Hello,
I adapted the nsis install script of OpenVPN-GUI to make it a bit less complicated to install. I now need to include a custom page where the usercan type the name of an admin account.
I created the custom page according to the MUI rules:
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${HOME}\install-win32\license.txt"
; Custom page to set the admin user
Page custom GetAdminUser SetAdminUser
; CUSTOM PAGE
Function GetAdminUser
; set title
!insertmacro MUI_HEADER_TEXT "$(ADMINUSER_TITLE)" "$(ADMINUSER_SUBTITLE)"
; Display the page.
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS_adminUser.ini"
FunctionEnd
Function SetAdminUser
MessageBox MB_OK "SetAdminUser"
; Get the user entered values.
!insertmacro MUI_INSTALLOPTIONS_READ $ADMIN_USER "NSIS_adminUser.ini" "Field 1" "State"
MessageBox MB_OK "Value: $ADMIN_USER"
FunctionEnd
And the line in the onInit.
The dialog shows and I can type in the box, but when I click the install button (BTW can I rename this to Next?) nothing happens.
I used the same code in one of my own scripts and that worked without a problem.
Any clou's
- Remi -