View Full Version : How to generate license keys

03-08-2006, 03:50 PM
Does anyone have any info on generating license keys, and storing them in InstallShield.

I was just planning on writing a function with a bunch of predetermined license keys listed. We would have more license keys than we needed for a delivery version. I would do one build with all those license keys in it. We give our clients a different license keys from the list.

Does that sound like a plan? Any other suggestions?

03-09-2006, 10:44 AM
What we do is compress (and potentially encrypt) the set of keys into a file as a preprocess to the install creation. Then add that file to the supportdir.
During install when a user enters a key we decompress (and decrpyt) the license file for lookup and validation via a custom action.
Hope this helps.

07-20-2006, 07:12 AM
how to encrypt the license key........what is the processs........

07-20-2006, 07:53 AM
There are many techniques. MD5 comes to mind first. There are many 3rd party packages to assist with adding crytography to an application.
So, in this install case with shipping predetermined licenses, encrypt them prior to packaging. Then at runtime via a custom action after the user enters the proposed license, decrypt the encrypted file containing the licenses and do your lookup. That still has loopholes, but you can further confuse matters for a hacker or use a differnt storage method.