Hi,
i'm making a license key checker in my installer, and it's doing something like :
again:
!insertmacro MUI_INSTALLOPTIONS_READ $R7 "PASSWORD.ini" "Field 5" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $R8 "PASSWORD.ini" "Field 6" "State"
System::Call '$TEMP\KeyCheck.dll::CheckKey(t R7) i .R9'
StrCmp $R8 $R9 continue
Goto wrong
wrong:
MessageBox MB_OK|MB_ICONSTOP "Wrong user name and password, try again"
Goto again
continue:
FunctionEnd
Classical..
But I have a problem, i don't want to check the key if the user click on Cancel or on Back button. Because it gives him the messagebox if he clicks on them... Not very cool. So I want only the key to be check if the user clicks on Next button.
I think there's a way to know on which button the user clicks.
Thanks for your help
Know clicked button
2 posts
you should write your code in the "leave" function of the custom page. It is only executed if the user continues. To prevent the page from closing (in case you allow re-entering the key) use the abort command