Activation Client

The Activation Client is a utility program that calls the Activation Web Service and enables the protected application to activate the license through the Activation Server. The Activation Client is provided with the full source code, which allows you to use or customize to your needs. You can find the Activation Client in the following directory:

 

ACTIVATIONSERVER\CLIENT\

 

In most cases, you do not need the Activation Client. You can easily enable the license activation functionality in the protected application. When using ElecKey Integrator to protect your application, from the Customize Messages dialog, ensure that you select the Dialog Box Style as Default Dialog Box/Auto-activation or HTML Dialog Box/Auto-activation.   

 

The use of Activation Client is optional, when you want to provide advanced licensing features such as license deactivation, license upgrade, etc. In this case, you may include the Activation Client in your application as a utility to allow the user to handle the license. You can also enable the protected application to invoke the Activation Client automatically, instead of using the default registration and activation dialog box. When using ElecKey Integrator to protect your application, from the Customize Messages dialog, ensure that you disable the Registration Dialog Box checkbox. In addition, ensure to include the KCAPI.INI file with the following content, to be placed in the same directory as the protected executable.

 

[Registration]

Application=ActivationClient.exe

Operations

The Activation Client performs the following three operations: activation, deactivation, and destorying license. These operations interact with the Activation Web Service in which the activation database is used to control the state of the operation. The following describes the operations in details.

Activation

Activation enables the protected application to obtain the License Key from the activation server. During activation, the Activation Client calls the InitLicKey function of the KeyCheck API to make a Key for the protected application. It then calls the ActivateLicense Web Service method to initiate an activation session. Both the Activation Key and the Registration ID from the InitLicKey function are sent to the Web Service. If the activation account, as identified by the Activation Key, is enabled, the Web Service calls the CheckRegID and MakeLicKey methods of the LKG .NET to verify the Registration ID and generate a License Key, respectively. When the Activation Client receives the License Key, it calls the PutLicKey function of the KeyCheck API to complete the activation.

 

The generated License Key depends upon the current status of the account, as indicated by the status/control fields in the database. Four types of license are available.

 

·         Original License. This is the case of first-time activation. The account is not yet activated (the Activated field is not checked) and the LicKeyTran and MasterLicenseCust fields are empty. The License Key is generated from the MasterLicense of the product associated with the account. As a result of this action, the Activated field is checked.

·         Replacement License. When the protected application is activated (the Activated field is checked), the end-user may be allowed to obtain additional replacement licenses if the ActivationCount is less than the MaxActivation. In this case, the License Key can be generated from the MasterLicenseCust or the MasterLicense. The MasterLicenseCust is used first, if available. If not, the MasterLicense is used. As a result of this action, the ActivationCount is incremented by one.

·         Custom License. If the account contains a MasterLicenseCust, the account has a custom license that replaces the original license (MasterLicense). This case happens when the account is deactivated (the Activated field is unchecked) and reactivation is required (the Reactivation field is checked). The License Key is generated from the MasterLicenseCust. As a result of this action, the Activated field is checked and the Reactivation field is unchecked.

·         Transfer License. This is the case of transferring the license from the server back to the client. The account is deactivated (the Activated field is unchecked) and has the LicKeyTran, which is a result of the previous deactivation. In this case, the License Key is generated from the LicKeyTran. As a result of this action, the Activated field is checked and the LicKeyTran field is cleared.

Deactivation

Deactivation temporarily removes the license from the protected application and transfers it to the activation server. It allows the end-user to reactivate or transfer the license back to the protected applcation. Deactivation can be useful in several scenarios. For example, the end-user can deactivate the application before upgrading the computer hardware so that the upgrade does not affect the license. When the upgrade is completed, the end-user can restore the license by reactivating the application. The end-user may also use deactivation/activation to transfer the license from one to another computer.

 

Deactivation can happen when the account is activated (the Activated field is checked). During deactivation, the Activation Client calls the GetStatus Web Service method in which the Activation Key is sent to the Activation Web Service. If the activation account, as identified by the Activation Key, is enabled, the Web Service returns the RegIDTran. RegIDTran is a Registration ID generated during the activation session to be used for license transfer. The Activation Client then calls the TransferLicense function (Transfer-out) of the KeyCheck API to accept the RegIDTran, and to generate a License Key that reflects the current status of the license. Finally, the Activation Client calls the DeactivateLicense Web Service method to save the generated License Key as LicKeyTran to the actvation account. In addition, the account is changed to deactivated (the Activated field is unchecked) and the ActivationCount is decremented by one.

 

Note that if the Reactivation field is checked, the account is waiting for reactivation. In this case, deactivation is not for license transter. Instead, it is deactivation so that reactivation can take place. As a result, the License Key from the Activation Client is verified only, but not saved as the LicKeyTran.

Destroying License

Destorying license permanently removes the license from the protected application. As same as the Destroy utility, the Activation Client calls the DestroyLicense function of the KeyCheck API to destroy the license. Destroying license can happen when the account is activated (the Activate field is checked). The Activation Client then calls the ConfirmDestroyCode Web Service method. Both the Activation Key and the Destroy-Code from the DestroyLicense function are sent to the Web Service. If the activation account, as identified by the Activation Key, is enabled, the Web Service verifies the Destroy-Code. If correct, the Activated field is unchecked and the Destroyed field is checked. This terminates the account. Finally, the Web Service returns a confirmation of the Destroy-Code back to the Activation Client.