Validating a Serial Number

For all your non-technical questions.
smoura
Posts: 8
Joined: Mon Feb 27, 2006 7:05 am

Validating a Serial Number

Postby smoura » Mon Feb 27, 2006 7:11 am

I've been conducting an evalution of InstallAware Developer, and I cannot see how I'd validate a serial number.

I've been able to add the registrationwithserial dialog. Now my problem comes when validating the serial. I have a DLL with the validation function. The issue here is how do I send the parameter to the function, wich variable identifyes the serial field.

And where can I see a list of variable names for the dialogs?

thanks in advance,
SMoura

CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Postby CandiceJones » Mon Feb 27, 2006 1:50 pm

Hi!

In the pre-built dialogs, the serials are stored in variables KEY1, KEY2, KEY3, KEY4 and KEY5.

Pre-initialize these variables using Set Variable. You may set them to empty strings each. You should do this before the dialog is shown.

Then you can dereference them anywhere in your script. For example, if you use the value $KEY1$-$KEY2$-$KEY3$-$KEY4$-$KEY5$, and assuming the user entered 0's for each field, the resulting literal would be 00000-00000-00000-00000-00000.

So you can pass that value to your DLL and obtain the result easily.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Postby CandiceJones » Mon Mar 27, 2006 9:07 pm

InstallAware now ships with a serial numbers sample. Just download the latest version, then click File | New | Samples, and double-click the Serial Validation sample.

This sample shows how to generate, and validate, unique serial numbers based on user input (their user name and company names, or any other custom fields you may like). The sample is entirely built in InstallAware script and does not depend on outside DLLs.
Candice Jones

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Non-Technical”

Who is online

Users browsing this forum: No registered users and 32 guests