Key Generator command line
Previous Top Next


The command-line license key generator can be integrated into any Webserver for Windows or Linux platforms. The program prints out a single line of text which is easily read by any web programming language supporting external CGI programs. ASP, PHP, Perl, etc.

This program is only available to licensed customers. To download visit:
http://thinstall.com/downloads


Usage:

th_keygen2 password [option1] [option2]


-dump KEY
This option can be used to print a text representation of a key restrictions previously generated.

th_keygen2 mypassword -dump p5pnszsgyjz9ze3w9j1qatcg


-expire_on YYYY-MM-DD

Expires the current license when the user's clock reaches a specific date. Example:

th_keygen2 mypassword -expire_on 2003-12-31

This will expire the license when the use'r clock reaches 2003-12-31. When the license has exipired,
the RTF file "date_expired.rtf" is displayed.


-expire_after X

Expires the current license after X days. Example:

th_keygen2 mypassword -expire_after 30

This will expire the license when the user clock's reaches 30 days after the key was first used. If a new
key is used, the time will be reset (old keys always remain expired, even if they are used again).

-max_runs X

Expires the current license after the program has been run X times.

th_keygen2 mypassword -max_runs 10

This will expire the license after the 10th run (i.e. 11th run will not be permitted). A separate run counter
is maintained for each key generated.

-mac_id X

The license key is only permitted for use on a machine with the Machine ID matching X.

th_keygen2 mypassword -mac_id fnyfcy7a27heatx5

This will expire the license when run on a computer which has a Machine ID other than "fnyfcy7a27heatx5".

-min_ver X.X.X.X

The license key is only permitted for with a software application having version number X.X.X.X or higher.

th_keygen2 mypassword -min_ver 2.0
th_keygen2 mypassword -min_ver 2003.12.31

This field can be used to force users to upgrade to a newer version of your software. For example specifying
a value of 2.0 will force all users using version 1.0 of your software to upgrade in order to use the key.

-max_ver X.X.X.X

The license key is only permitted for with a software application having version number X.X.X.X or lower.

th_keygen2 mypassword -max_ver 2.0
th_keygen2 mypassword -max_ver 2003.12.31

This field can be used to restrict older users from using new versions of your software without paying for them seperately.
For example, a value of 1.9 might be used when issued to 1.0 customers, allowing them to upgrade for free
until you reach version 2.0. Alternatively, you can use dates for version numbers such as 2003.12.31 to allow
a customer to upgrade for free until a specific date. In both cases you should adjust the "Release Version"
in the license system 2 dialog before building and releasing a new EXE.

-license_data "LICENSE INFORMATION"

LICENSE INFORMATION = a string of any length containing 8 bit ANSI characters describing your licensing information.
This information is passed to your program by setting the Environment variable TS_LICINFO. The information is embedded
in the license key, so the longer the license information string - the longer the key will be. To keep key lengths as short as possible
limit license information.

This string can be used to pass in the name of the licensed user, company, serial number, etc.

th_keygen2 mypassword -license_data "Company XYZ"
When your program is run, it can check the environment variable TS_LICINFO to see who the license is for and show this information in an About box.

License information can also be used to sell specific features that are turned on when present in the license data. For example:
th_keygen2 mypassword -license_data "feature_x=on,Company XYZ"

When your program is run, it can check for "feature_x=on" in the TS_LICINFO environment string to determine if it should allow use of feature_x.

-expire_prev
When this option is set, the user's previous key will be expired when this key is entered and accepted. If this option is not set, the user will be permitted to switch
back to their previous key (until it expires).

-cont_runcount
When this option is set, the run counter will be copied from previous key. If this option is not set, the run counter will start at 0 for this key.
In either case, if the user is permitted to switch back to a previous key (see the option above), the run counter will revert to what it had previously
been for that key.

-add_prev_days
When this option is set, any unused remaining days from previous key are added to the current key. When this option is not set, the user
will always have exactly the number of days allowed by this key alone.


By combining multiple options, you can place more restrictions on when your software can be used. For example:

th_keygen mypassword -expire_on 2005-01-01 -expire_after 365 -max_runs 50 -license_data "serial=1000,featureX=on,Company XYZ"

This will generate a key that:
1. Always expires on Jan 1, 2005 no matter when it is first used
2. Expires 365 days after it is first used
3. Contains the license_data "serial=1000,featureX=on,Company XYZ" which the program has direct access to while running