Serial number custom page
Hi everyone,
I discovered this program today, and am quite impressed. It seems able to do everything I require, but I'm having a little difficulty with one thing.
Basically, I want to use a custom page where the user enters his serial number, and install the appropriate options based on that. It's not really a copy protection scheme (the user still needs to activate the product), more of a way to incorporate everything in one installation package.
Here's an example of the function I'm using (I'll put a dll call in later, just a StrCmp for now...):
It works, in so far as if the user does not enter "07" (in this example) in the text control I placed, the page will clear the serial and reload the page (dialogs etc to be added).SerialPage
insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
loop:
!
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "serial.ini"
ReadINIStr $INI_VALUE "$PLUGINSDIR\serial.ini" "Field 2" "State"
StrCmp $INI_VALUE "07" exit
WriteINIStr "$PLUGINSDIR\serial.ini" "Field 2" "State" ""
>goto loop
>exit:
>FunctionEnd
>
My problem occurs when the user clicks the "Cancel" button. The installer will only quit when a valid serial number has been entered. Is there another way to do this? Can I trap the Cancel button? I've hit a bit of a blank.
Thanks in advance
Pete.