Archive: Problem with a custom page


Problem with a custom page
Don't have that much experience with custom pages. What i want to do is a custom page that allows me to read a firm's name , and if the firm's name field is empty , to not allow the next step of the installer to be executed .

Function GetNameDlg
!insertmacro MUI_HEADER_TEXT "$(USERPASS_TITLE)" "$(USERPASS_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "custfile"
!insertmacro MUI_INSTALLOPTIONS_READ $firmName "custfile" "Field 2" "State"
StrCmp $firmName "" error continue
error:
MessageBox MB_ICONSTOP|MB_OK "Pls enter firm's name"
Call GetNameDlg
Abort
continue:
FunctionEnd

This is the function that handles the custom page. My problem is that if the field that should contain the firm's name is empty and i press CANCEL on the page( using modern UI) the message box pops out , and the function is re-executated. I cannot quit the installer in this situation . Any ideea about how should i get around this ? Is there a method that allows me to see that the CANCEL button was pressed and trigger the close installer procedure?


Drop the code and use MinLen in the INI file.


Thanks a lot :)