HOW TO USE PROTEUS?
Drop a TProteus control on your form. Build a Trial key using the provided 'Key generator'.
Set the Trial key to expire in 30 days (for example)
Enter the key in Proteus.
At program start up, check the status of the certificate. If the certificate is in
Trial mode: let the user use your program
Demo mode: let the user use your program BUT don't allow him to save the work (or implement some other kind of limitation: show a nag screen, cripple some important functionality, etc) until he purchases a license
Compile and deliver your application.
HOW IT WORKS?
At start up the program checks the registry to see if any key is already installed.
If a key is found:
* It is decoded & loaded (into the 'Certificate' field).
* It sets the LicState field accordingly: demo, trial, registered...
* If the user is in the trial period and he downloads a new trial version and this new trial version has a new key, upgrade to it (get a new full trial period). See: UpgradeToNewTrialKey
If no key is found:
* It uses the default (trial) key (delivered with the program).
At start up the program also checks if the system date has been tempered with. The LastSeen field is used for this.
How to use Proteus? (Step by step guide)
1. Customize the Key Generator app provided with Proteus to match your needs:
Set the 'ProductName' field to something like 'MyApp'.
Set the 'CertificateID' field to to anything you want. Example:
* A Trial certificate: Set the ID field to 'Trial'. If you release a new version and you want to offer a new trial period so the customers can 'taste' the product one more time, you can change the ID to somethign like 'Trial 2'
* A Permanent certificate to be delivered to your customers (as text key): Set the ID field to something like 'Definitive key' or 'Rent 3M'.
Build more certificates as needed.
2. Drop a TProteus control on your main form.
Set the 'ProductName' to exactly same value as in your KeyGenerator app (above)
Set the 'AutoStoreCertificate' to True
Set the 'ObfuscateReg' to True for higher protection or to False for easier debugging.
Enter the default certificate (generated with the Key Generator app) in the 'TrialCertificate' field (as textual key).
Add code in the 'OnSwitchToDemo' event handler
Finally call Proteus.Initialize at your app start up.
If you offer a time-based trial:
Call 'CheckComputerClock' from time to time to make sure the user didn't set the system clock back.
Use ShowRemainingTime function to display (could be in form's Caption) what's left from the trial period
3. Add a 'Stolen keys' list to your project:
a. Put the stolen certificates in 'CheiFurate.txt', one per line.
The line has the following format: CertificateID=UserName. Be careful not to use spaces around '=' sign.
b. Create a RC file with this content: Blacklist RCDATA CheiFurate.txt
c. Compile the RC and bind it into your app by adding this line (right on top) in your DPR: {$R 'ResurseIncluse.res' 'ResurseIncluse.rc'
CHECKS
Entering the same key twice
There is an algorithm that prevents the user from entering the same key twice.
This is based on CertificateID field. Basically, when the user enters a key, the program checks if a key with the same ID already exists in the system. If it does, the new entered key is refused.
Because of this:
* when Default (Trial) keys are generated, the ID should remain the same to prevent the user to re-download the trial application and use it over and over - unless you want to allow this, as in the case when you release a brand new version.
* when Permanent keys (non-trial) are generated and sent to the customer (especially in the case of 'RENT'), the ID field should be different for each key. We recommend you to append the current date to the ID field.
Example: If a key (for example Rent) is generated to the user, then the user purchases another key (Rent) the 'Certificate ID' of the keys MUST be different else the program will show a 'This key has been already installed' error message. Example: the ID of the first certificate might be 'Rent1M 1st' and for the second certificate 'Rent1M 2nd'.
____________________________________________________________
DETAILS
CERTIFICATE:
A (binary) set of data that tells the program how to work (to whom is registered, when the license key expires, etc).
KEY
The text representation of the certificate (obtained by passing the certificate data through a MIME encoder to get a human-readable string).
The user receives a key uppon purchasing a license. The user enters the key into the program (see 'EnterKey' function) to unlock the program.
The key can be:
* Permanent (it unlocks the program forever)
* Temporary (it unlocks the program for a predetermined period of time)
TRIAL KEY
A specially crafted key/certificate that allows the program to work for a limited period, then to switch to Demo mode.
In Trial mode all (or only some) of the functions of the programs are available.
In Demo mode, program's functionality could be seriously limited. For example all functions are available except 'save'. This will convince the user to purchase a license.
DEFAULT KEY
The key delivered within the program (Proteus). Usually it is a Trial key/license.
Details: Proteus checks if a key is already present in the system. If yes, then loads that key.
If no (this is usually the first time when the program runs in the system, after Setup), it uses this Default key to determine for how long it will work before it switches from Trial to Demo.
STOLEN KEYS
If one of the license keys you sent to your customers was leaked on internet (on a web site that delivers serials/cracks) you can put is in this list.
At each start up, Proteus checks the current certificate against the 'Stolen keys' list.
If current certificate is found in the Stolen Keys list, Proteus will switch to Demo mode.
The user is not allowed to enter anymore keys (even if he has a valid key).
When building the 'stolen keys' list use the following format: ID=UserName
Both ID and UserName must be found in the stolen list.
AMNESTY KEY
This allows a user that was forcefully put in Demo mode to enter a key.
To do so, the user will have to enter the word 'Amnesty' as key.
After this he will have to enter the valid license key.
INTERNAL DETAILS:
The application should be delivered to the user with a 'Default trial certificate'.
If multiple certificates are found in registry, ONLY one certificate can be active.
The last certificate entered becomes active and inactivates all other active certificates.
When the current (active) certificate expires it switches to DEMO but it still remains the Active certificate.