Validation of User Licenses

HTML Executable lets you add a license validation to your ebooks or publications. Validation is a process that checks the validity of the end user’s registration key before letting him access the ebook. Since it can be performed periodically, validation allows you to control the use of your ebook: for instance, you can remotely block access to your publication in case of fraudulent purchases or refunds.

To add a validation process to your ebook, go to the Certificate Manager, double-click on a certificate and choose the “Validation” tab as shown below:


This option is only available if you are working with online activation.

End users must have an active Internet connection, otherwise validation cannot be performed. Validation requires a remote web server with the HTML Executable Activation Kit installed on it, or an active subscription with our ebook protection service Protect Ebook .net.

About the validation process

The validation process is automated: the publication interacts with the activation server automatically. To perform validation, the publication sends the activation key, the registration key and the unique system ID to the activation server. No private personal data is sent.

The latter checks the received information and looks for the user’s account in the databases. If the account is marked as “blocked” or if an error occurs, validation is negative. Otherwise, validation is positive and the activation server returns a validation code. The publication finally checks this validation code and determines whether access is granted or not.

If the customer uses a proxy server, he should have already configured it when activating the publication and the latter will reuse the same proxy settings. If the proxy server has to be changed, it can be done through command line.

Validate the user key

You can choose the validation frequency. For example, you can check the validity every X times the publication is run. In that case, you have to enter the value for X (an integer such as 3).

For advanced users, you have two ways to customize the validation process:

  • Manually with HEScript calls: you can write your own HEScript scripts and call the validation process when you want thanks to the following HEScript code

if not RunSimpleBooleanFunc("Trial.DoServerValidate", false) then


//  Actions to perform when the validation was unsuccessful, for instance display an error
// message and exit publication: ExitPublication;

 ShowMessage("Could not validate your license. Please ensure you have a valid subscription");



  • If the OnKeyValidation event (in UserMain) returns True. You can choose this frequency and your publication will invoke the UserMain.OnKeyValidation HEScript event that you should have customized in the User Scriptingpage.
function OnKeyValidation: Boolean;
 Result := True; //  Returns True to perform validation

If the key cannot be validated

Select the action that should be performed if the validation is unsuccessful:

  • Exit the publication: displays an error and exits.

  • Return to the Trial state: the publication automatically reverts to the Default certificate and exits. Registration information is consequently erased. This option is not recommended however.

  • Call the OnKeyNotValidated HEScript event (in UserMain): the publication invokes the UserMain.OnKeyNotValidated HEScript event that you should have customized in the User Scriptingpage.

function OnKeyNotValidated: Boolean;
MessageBox("This program will close now because it could not verify your license", "User Error", MB_OK);
Result := True; // Returns True to exit the program

Messages related to the validation process can be easily customized using the Language page: the publication uses resource strings named SValidationXXX.

Copyright G.D.G. Software 2019. All rights reserved