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...):
Function SerialPage
loop:
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!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 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). 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.