Feature-Based Node-Locked License

This tutorial demonstrates how to implement USB License and protect your application as a feature-based node-locked license. Specifically, you want to distribute your application with a USB License Key (dongle) in which you can enable/disable each individual feature or module of the application.  

 

Based on the settings used in this tutorial, the following describes how the user would experience the protected application.

 

·         You distribute the application with a USB License Key (dongle).

·         The user must attach the provided USB License Key to the computer before starting the application.

·         The user can use only the features or modules of the application that are enabled in the USB License Key.

·         The user can transfer the license by moving and attaching the USB License Key to another computer.

·         The user can use the Register utility to upgrade license online for new features or modules in the future.

Protecting Applications

The following instructions use ElecKey Integrator (the shell protection method) to protect the application. For feature-based protection, each feature or module of the application must be a separate executable file, and must be assigned a different Module ID. The necessary settings are described below. However, you may change the options as you want.

 

Besides the shell protection method, you may also use the provided KeyCheck API (including the KeyCheck Class Library and the KeyCheck .NET Component) to protect your application, by specifying the same settings as described below. When using the API, however, it is not necessary to make each feature or module of the application as a separate executable file. Please see Protecting Applications Using API and the provided code examples for more information.

To Protect an Application

1.       Run ElecKey Integrator. The wizard dialog box appears.

2.       In the Select Application License Type dialog, select USB License (Dongle).

3.       In the Select Integration Task dialog, select Protect Code and Enforce Licensing.

4.       In the Specify Protected Program dialog, specify one of your executable file names in the Original field. In the Target field, specify a different name for the protected executable file that will be created.

5.       In the Set Identification dialog, assign a Program ID in the Program ID field. In addition, assign a Module ID in the Module ID field.

6.       In the Key Detection Method dialog, select Detect Stand-Alone Key.

7.       In the Set Options dialog, you can use the default settings.

8.       In the Summary dialog, review the action you have chosen.

9.       Click the Integrate button. The protected version of your executable file is created.

 

Next, repeat the steps above for each of the executable files in your application. In step 5, ensure that you assign the same Program ID and a different Module ID for each executable file.

 

It is recommended that you save your unprotected executable files in a safe place. You can then rename the protected versions to their original file names, and use them further to create a setup package and distribute your application to the user.

Licensing Protected Applications

By implementing USB License, you can license the protected application by making the USB License Key (dongle) to be provided to the user. For feature-based licensing, you can enable the licensed features or modules in the USB License Key. The following instructions describe how to use USB LicenseKey Manager to make a USB License Keys.

To Make a USB License Keys

1.       Run USB LicenseKey Manager.

2.       Attach one or several blank USB drives (via a USB hub) to your computer.

3.       In the Main tab of the Key Properties pane, from the Program ID drop-down list, select Program ID of your application.

4.       From the Implementation drop-down list, select Distribution.

5.       Click the Modules tab. In the Licensed Modules box, select the checkboxes of the modules you want to license.

6.       From the Package pane, you can save the settings as a package for future use. In the Package Name field, enter the title of the package. Then, from the File menu, click Save.

7.       From the Note pane, you can enter notes about the package in the Messages field. Then, from the File menu, click Save.

8.       Optionally, from the File menu, you can click Set Key Value to generate 10 random key-value pairs to be stored in the Key. The Key Value can be accessible if you protect your application using the KeyCheck API.

9.       Optionally, from the File menu, you can click Set Content Files to specify the folder that contains the content files of the application. All files will be copied to the USB License Key automatically during the making.

10.    From the Key Properties pane, click the Make Key button. The Make Key dialog box appears.

11.    In the Make Key dialog box, select the checkboxes of the drives you want to make the USB License Key. Then, click the Make button.

Updating USB License Key Online

By implementing USB License with the online update option, the user must start the Register utility for USB License. You can update the license by generating the License Key to be returned to the user. For feature-based licensing, you can enable the licensed features or modules to be encoded in the License Key. The following instructions describe how to use LicenseKey Manager to generate a License Key.

To Generate License Key

1.       Run LicenseKey Manager.

2.       In the Main tab of the Key Properties pane, enter the Registration ID received from the user in the Registration ID field. Then, click the Check and get User License Status under the Check button.

3.       The Identification field shows the Key ID, Program ID, and flag decoded from the Registration ID.

4.       The message User License Status: shows the status, and the current license status is loaded in the Key Properties pane, which you can update the license.

5.       From the Implementation drop-down list:

·         Select Distribution if you want to generate the License Key that turns the application into the full version with no limit.

·         Select Evaluation if you want to generate the License Key that extends the trial period. You can then specify the Expired Date, Max-Day, and Max-Exec as you want.

6.       Click the Modules tab. In the Licensed Modules box, select the checkboxes of the modules you want to license to the full featured version.

7.       From the Note pane, you can enter notes about registration such as the user’s name, address, telephone, etc. in the Messages field.

8.       From the Email pane, you can enter the user’s email address in the Email Address field.

9.       Click the Key Properties pane. Then, click the Generate button. The License Key is shown in the License Key field. All registration information (including Registration ID, License Key, date, etc.) are automatically recorded in the Registration List pane.

10.    To send the License Key via email, click the Email pane. Then, click the Send button. LicenseKey Manager automatically launches your default email composer with both email address and License Key filled in.

Distributing Protected Applications

To create a setup package and distribute your application, please ensure to include the protected versions of your executable files and the ElecKey system files. For Win32/Win64/.NET applications, the following is the list of the needed system files:

 

·         Ekc3220.dll (in \Deploy\Win32App\KeyCheck\)

·         Ekc6420.dll (in \Deploy\Win64App\KeyCheck\)

·         Ekag20nt.exe (in \Deploy\Win32App\KeyCheck\)

·         Ekag6420.exe (in \Deploy\Win64App\KeyCheck\)

 

The above system files must be placed in the same directory as the protected executable files. Depending on the features you have enabled, you may need additional system files. See the topic Protecting Windows Apps/Deployment for more details.