Serial Number Generator

Post specialized setup scripts you have created here.
iamfromk
Posts: 3
Joined: Mon Oct 04, 2010 2:51 pm

Serial Number Generator

Postby iamfromk » Mon Oct 04, 2010 2:55 pm

Hi,
I need the algorithm of Serial Number Generator provided as an example with InstallAware package. I want to generate the serial on server side with PHP from customer name and company and after that to email the generated serial to the customer. Please help.
Thanks

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Serial Number Generator

Postby mills » Mon Oct 04, 2010 6:39 pm

In the Serial Number Validator sample, the included script, Serial Number Generator has all the logic laid out for you.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

iamfromk
Posts: 3
Joined: Mon Oct 04, 2010 2:51 pm

Re: Serial Number Generator

Postby iamfromk » Tue Oct 05, 2010 8:03 am

mills wrote:In the Serial Number Validator sample, the included script, Serial Number Generator has all the logic laid out for you.

Yes i have checked that script file but unfortunately i can't replicate in PHP this 2 lines:

Set Random Number Generator Constants = 24337, 17312
Set Random Number Generator Seed = 31415

if someone have done this before maybe will give me some ideas ?
Thanks.

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Serial Number Generator

Postby mills » Tue Oct 05, 2010 4:20 pm

It's not clear what the constants are used for. I'm going to look at the code to see if I can find out what it does.

The seed should be pretty straight forward.

For PHP, you'll probably want to use srand() or mt_srand()
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Serial Number Generator

Postby mills » Thu Oct 07, 2010 5:51 am

How about creating a single-executable using the sample to generate the serials for you?

You can have it write the serial to file and call it using PHP's exec()...
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

iamfromk
Posts: 3
Joined: Mon Oct 04, 2010 2:51 pm

Re: Serial Number Generator

Postby iamfromk » Thu Oct 07, 2010 8:13 am

Thanks for your responses. I solved this problem :) i have written my own key generator and validator to be able to integrate with the serverside key generator :)
Thanks.

lifer
Posts: 1
Joined: Fri Dec 17, 2010 1:05 pm

Re: Serial Number Generator

Postby lifer » Fri Dec 17, 2010 5:22 pm

iamfromk wrote:Thanks for your responses. I solved this problem :) i have written my own key generator and validator to be able to integrate with the serverside key generator :)
Thanks.

There is a way to share you app?
Or does anyone know from where to download ?


Return to “Sample Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests