Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 16th December 2003, 07:47   #1
JonCan
Junior Member
 
Join Date: Dec 2003
Posts: 8
Know clicked button

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
JonCan is offline   Reply With Quote
Old 16th December 2003, 08:49   #2
flizebogen
Senior Member
 
Join Date: Jan 2002
Location: Berlin
Posts: 171
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
flizebogen is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump