Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Force user to enter a product key


1 reply to this topic

walterl

walterl
  • Members
  • 1 posts

Posted 01 November 2005 - 09:20

I'm a brand new user of Installshield Devstudio version 9.0 service pack 1.

The person that worked at my new company before me created a setup file, and one of the things he did was a screen (custom dialog) that asks the user for a CD key.

It looks like he never got this to work, as the setup continues even though an unvalid CD key is entered.

He's got a next button on the screen, in the DoAction event for the next button, the argument is "TestCD" with a condition of "1", (which I understand means do always)


the TestCD is then defined as a custom action with script text similar to this:

if "code in here that validates what the user entered" then

if "input validation check" then
if "key validation check" then
else
'key is invalid
msgBox("Please enter a valid CD Key... Click back to enter the correct information.")
end if
else
msgBox("Please enter a valid CD Key... Click back to enter the correct information.")
end if


The Newdialog event has as it's argument the next form that must be displayed


and this is the condition

((Not SERIALNUMVALRETURN) OR (SERIALNUMVALRETURN=SERIALNUMVALSUCCESSRETVAL)) and ("key validation check")


Can anyone perhaps tell me why the process continues whether the user enters a valid key or not?


jrcoldinmn

jrcoldinmn
  • Members
  • 16 posts

Posted 22 November 2005 - 21:44

Well, it looks like the code was in development and some was passed over just to create the flow. I assume that the person intended to go back at some later date and replace the literal strings with actual code that would validate what the user entered and then test the result in order to branch properly. The existence of literal strings acts like a "1", so each if statement passes as TRUE and the else code is not executed. Therefore it looks like the test has succeeded.

Not enough information on Newdialog condition.

Resolution... write the code.