Last Modified October 1, 2026
- Home
- Guides
- Custom Activation
- Set CDM Location
The CDM License File is a small encrypted and signed file containing key license
information, which is stored and locked to the User's computer.
The location of the CDM License File is a critical element of your software_DNA implementation
This location must be accesible by all users and must be Read/Write for all users of the application
on the target computer. The recommended location of the CDM license file depends on the OS (Windows, Mac,
Linux or Android).
See Location of CDM File
for our recommendations.
Set the location of the CDM License file
As the first API Call in your App, set the location of the CDM License file with either of the following:
DNA_SetProperties("CDMPathName",<pathName>) (recommended with Version 6 and above)
DNA_SetCDMPathName(<pathName>) (supported for backward compatibility)
- <pathName> is the full file name and must use UTF-8 encoding
Ex (Windows): C:\Users\Public\HelloWorld\HelloWorld.CDM
- If not set, the CDM License file will be located by default in the same
directory as the application executable which may not be the recommended location.
Set other DNA Properties (Version 6 and above)
The following properties can be set with DNA Properties:
- CDMPathName
- INIPathName
- (*) deviceID - mandatory for Android devices
- (*) ComputerName - mandatory for Android devices
- (**) userID
(* For other devices, these properties should only be used in special situations after consulation with softWORKZ Technical Support)
(** Should only be used in special situations after consultation with softWORKZ Technical Support)
See also:
Setting the location of the CDM License File
Highlighted lines indicate where additional code is required or needs to be modified.
//
// set the location of the CDM License File
// CDMPathName MUST be encoded in UTF-8
// This example shows the recommended location for a Windows OS Application
char* CDMPathName = "C:\\Users\\Public\\HelloWorld\\HelloWorld.CDM";
errNo = DNA_SetProperties("CDMPathName",CDMPathName);