Activation file feature can be enabled in remote protection activation file settings.

Activation file provides alternate way of sending activation information to end users. Instead of entering both activation code and serial number, end user would use single activation file for activation. Even more, activation file can also hold custom user information and custom updates policy information which would be used instead of default information that was embedded into protected application during protection process.

Default activation file is named 'LICENSE.DAT' and by default, activation file should be located in same directory with protected application.

Default activation filename can be changed in activation file settings. Activation filename can include wildcard characters, for example, an asterisk (*) or a question mark (?). In case wildcard characters are present in filename protected application will load the first activation file that matches the specified pattern. Default activation filename is stored in protected application during protection process.

Use -PCG_CL_ACTFILE command line option to override default activation filename and location which is defined in project settings and embedded into protected application by passing it via command line to protected application.

Activation file processing

Activation file is automatically managed by our protection code embedded into protected application. Protection code will try to load activation file on each run on the following occasions:

- during demo mode and after demo mode expires.

- application is locked.

- after application is activated in case license extension feature is enabled.

- after license expires if limited license is enabled.

If serial numbers feature is enabled, both activation code and valid serial number should be present in activation file.
For license extension, activation code has to be marked with 'License extension' special flag. Protection code will not process activation file and will display error message otherwise.
Activation file can also be loaded directly from protected application at any time by using LoadActivationFile() advanced protection interface function.

Structure of activation file

Activation file is binary, encrypted file which can hold the following information:

Mandatory information

- Activation code (standard or extended)

- User information

User information from activation file will replace default user information which was embedded into protected application during protection process.

Optional information

- Serial number

- Updates policy

Generation of activation files

Activation files are generated in activation panel.

AC Generator supports generation of activation files.

General procedure for generating activation files is the following:

1 Load project that was used for protection.

2 Open activation panel.

PC Guard: Activation panel

3 Set Site/MID codes from remote computer.

Be sure to set next Site/MID codes and not current Site/MID codes in case you intend to generate license extension activation code.

4 Set custom features as required (optional).

5 Set extended activation options as required (optional).

6 Set serial number (optional).

7 Change default user information (optional).

User information panel is automatically opened when opening activation panel if activation file feature is enabled. If closed, it can be opened again with "User info" button.
PC Guard; User information panel

Use Reload button to reload default project user information. User Save button to save currently edited user information to project settings as default user information. User information can be edited from within activation panel for each activation code without changing default user information in project settings as all changes made in this panel are not automatically saved as default for current project.

8 Select "Embed updates policy" option and click on Edit button  to set custom updates policy (optional).

Updates policy panel is automatically opened when opening activation panel if activation file feature and updates policy are enabled in remote protection project settings. If closed, it can be opened again with "Edit" button located next to "Embed updates policy" option.
PC Guard: updates policy panel

Updates policy panel includes buttons for reloading default project updates policy (Reload button) and saving currently edited updates policy to project settings as default updates policy (Save button). Updates policy can be edited from within activation panel for each activation code without changing default updates policy in project settings as all changes made in this panel are not automatically saved as default for current project.

"Limit updates for activated application" and "Change active updates policy on remote computers" options will always be checked and set to read-only on updates policy panel.
If "Embed updates policy" option is checked and updates policy panel is closed at the time of generation of activation file, default updates policy settings from project settings will be used as updates policy for activation file.

9 Click on "GENERATE" button to generate activation file with current activation information.

 If 'Save activation report' option is set, activation report will be automatically generated after generating activation file.

Errors related to activation files

In case there is a problem with activation file, protection code will display LNG_INVALID_ACTIVATION_FILE ("Activation file error!")  message together with additional error code which can provide additional information about error.

Error codes are defined as follows:

Error code Description
00000001 Activation file is missing
00000002 Invalid major version
00000003 Invalid header size
00000004 Header checksum error
00000005 Unable to read activation file
00000006 Activation code offset error
00000007 User info offset error
00000008 Invalid activation code
00000009 Invalid serial number
0000000A Invalid user information size
0000000B Wrong extra data size (old version of activation file)
0000000C Extra data checksum error
0000000D Activation code is already in use (no longer in use *)
0000000E License extension is disabled
0000000F Invalid activation code for license extension
00000010 Evaluation period for this program can not be extended

(*) Protected application will try to load activation file even after activation if license extension feature is enabled. This error was displayed in case activation file that was originally used for activation was still present in application's folder after activation either because "Delete activation file after activation" option was not enabled or in case it was enabled but protection code was not able to delete activation file after activation due to inadequate security rights. Since version 06.00.0610, protection code will just ignore such activation file and will not display any error on startup.

Related pages