PDA

View Full Version : Retry Count with Serial# Validation



nlk10010
01-08-2003, 12:09 PM
I've hit behavior which seems improper in my ISX4 project.

I'm validating a Serial# via DLL. The parameters on the Customer Information Screen are set for a Success Return Value of 1 and a Retry Count of 0. My DLL returns an integer 1 on success and 0 on failure (it's written in Delphi with a stdcall return).

When a valid Serial# is entered during install all proceeds normally. When an invalid one is entered, however, I get a screen that tells me something prevented IS from installing the product and I should retry the install after clicking a Finished button. This occurs after the FIRST incorrect attempt.

Could anyone suggest what I might be doing incorrectly? The return values ARE supposed to be integers, aren't they? :) Is this working for others?

The other functions in the same DLL work fine, but I'm of course open to suggestions.

Thanks in advance for any info.

=NLK=

Chandima
01-08-2003, 01:23 PM
Is the dialog you get one similar to the "Setup Complete Success" dialog or just a message box? If it's the first then this is the expected behavior. To make it a better end user experience, before returning the value, try throwing a message box that says "you have entered and invalid serial number". As far as the setup is concerned the serial number validation is just another custom action.

nlk10010
01-08-2003, 01:46 PM
Yes, it is similar to the Setup Complete Dialog.

My issue is not with this particular dialog (throwing up a message box is a good idea that should have been obvious to me, however); rather, it's that this occurs after the FIRST invalid attempt. My understanding was that the user shouldn't be thrown off until multiple attempts had been made (controlled by the Retry entry).

Thanks.

=NLK=

Chandima
01-08-2003, 02:27 PM
Um, I thought you said you set the "Retry Count" property to 0 which means the user is not allowed to try again. If you set this property to 3, then the user will be allowed to try it three times. Is this the case?

nlk10010
01-08-2003, 03:02 PM
Yea, see I can't type any better than I can think. My bad.

I see I wrote that the Retry Count was set to 0; actually, I set it to 3 (Three). My DLL returns integer 1 on success, 0 on failure oh, and, in case I forgot to mention it, the Retry count is set to 3. :) Again, user is given only one chance to enter the Serial#.

BTW: I looked at the C++ sample on your site and it appears (I'm no C++ coder) that it's returning a Char. When I tried that in my DLL (i.e. return '0' on failure and '1' on success) I DID get a chance to enter the Serial# three times before getting bumped off; unfortunately, when I entered a correct Serial# it still acted as if it was invalid.

Any ideas? Sorry to waste your time on the previous message.

=NLK=

Chandima
01-08-2003, 04:03 PM
For what it's worth, try making your DLL return a 1 if the Serial Number is correct and a 2 if it is incorrect. I remember a user saying that making one these return a 0 did something wierd to the Retry limit (at least in his case).

nlk10010
01-08-2003, 04:17 PM
Whoa. That seems to work (however, I reserve the right to revisit this thread if it turn out there's still a problem :) ).

Thanks for your help (and persistence).

=NLK=

Painin the S.
01-16-2003, 04:43 PM
Quote in the InstallShield Express 4 help topic for 'Serial Number Validation':
Your DLL should return a specific value every time it is run. The example DLL provided by InstallShield Express returns 1 on success and 0 on failure. Therefore, enter 1 into the Success Return Value field. When you write your own DLL the success return value can be whatever you choose, as long as it is non-zero.The InstallShield documentation is wrong on this point. Your DLL should never return 0 upon a false serial number, but -1.

Chandima
01-16-2003, 06:16 PM
I have created Work Order 1-CEKR7 to fix the documentation. Thanks!