Instead of sending activation code and serial number to end user separately this information can be embedded into single activation file which would be then distributed to end user.
Location of activation file
Activation file should be located in same directory with protected application.
Name of activation file
Default activation file is named 'LICENSE.DAT' and can be changed in activation file remote protection settings. Please be sure to set filename only, not full path to activation file.
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.
Changing default activation filename dynamically from command line
Use -PCG_CL_ACTFILE command line option to override default activation filename which is defined in project settings and embedded into protected application by passing it via command line to protected application.
When will protected application try to find and load activation file?
Protection code will try to load activation file on each run:
1. during demo mode and after demo mode expires if demo mode is enabled.
2. until application is activated.
3. after application is activated (in case license extension feature is enabled)
4. after license expires (if limited license is enabled)
If serial numbers feature is enabled in case of 1, 2 and 3 both activation code and valid serial number should be present in activation file.
In case of 4 only activation code is required. This activation code has to be marked with 'License extension' special flag. If it's not marked as license extension activation code protection code will not process it and will display error message.
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 holds the following information:
- Activation code (standard or extended)
- User information
User information from activation file will replace default user information stored into application during protection process.
Next time you need to update license, reactivate it or extend it you can send standard or extended activation code only without sending activation file with user information. Protected application will still use user information from original activation file.
User information can be changed again with new activation file.
- Serial number
- Updates policy
Select "Embed updates policy" option to embed updates policy (from remote protection settings) into activation file. Updates policy from activation file will replace existing updates policy.
Generation of activation files
By default, activation files for protected applications can be generated in PC Guard's activation panel. AC Generator also supports generation of activation files.
Errors related to activation files
In case there is a problem with activation file, protection code will display LNG_INVALID_ACTIVATION_FILE (default: "Activation file error!") message together with additional error code which can provide additional information about error.
Error codes are defined as follows:
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.