Shareware License

This tutorial demonstrates how to implement Machine License and protect your application as a shareware license. Typically, as shareware, you want to distribute your application as a trial version that allows the user to evaluate the application for a limited trial period. If the user wants to continue to use the application after the trial period, you can issue the License Key to turn the trial version into the full registered version.

 

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

 

         When starting the application, the Registration dialog box pops up. The user may click the Register Later button to skip registration during the trial period.

         The user can try out the application for a limited trial period.

         The user cannot gain additional trial period by reinstalling the application or turning back the system clock.

         To register, the user can click the Register button to link to your registration webpage, or send you a registration email. In both cases, the Registration ID is automatically passed to the webpage or the email composer.

         The user can click the Register button to link to your website and register the application. The Registration ID is automatically passed to your website.

         Alternatively, the user may contact you by phone, fax, etc., and provide the Registration ID.

         With the received Registration ID, you can generate the License Key to be returned to the user that turns the trial into full version (or extends the trial version).

         During registration, you may collect the user information and charge the user a license fee.

         When the user enters the License Key in the Registration dialog box, the application is turned into the full registered version.

Protecting Applications

The following instructions use ElecKey Integrator (the shell protection method) to protect the application. 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. 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 Machine License.

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

4.       In the Specify Protected Program dialog, specify your executable file name 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.

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 Choose Implementation dialog, select Shareware.

9.       In the Select Evaluation Mode dialog, General Evaluation is preset for the shareware license. Specify the limits as you want.

10.    In the Customize Messages dialog, the needed dialog boxes for the implementation you have chosen are automatically checked. However, you can enable the dialog boxes as well as edit messages and options as you want. Then, click the Edit button of the Registration Dialog Box checkbox.

11.    In the Registration Dialog Box Properties dialog box, click the Options tab. Then, in the URL/Email/Document/Executable field, enter your website URL. For instance, https://www.sciensoft.com/register.html or https://www.sciensoft.com/register.htm?regid=<EncRegID>. Or, enter the email composer parameters. For instance, mailto:service@sciensoft.com or mailto:service@sciensoft.com?subject=Request License Key&body=My Registration ID is <RegID>.

12.    In the Create End-User Utilities dialog, the needed end-user utilities for the implementation you have chosen are automatically checked. However, you can choose to build the end-user utilities as you want.

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

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

 

It is recommended that you save your unprotected executable file in a safe place. You can then rename the protected version to its original file name, and use it further to create a setup package and distribute your application to the user.

Distributing Protected Applications

To create a setup package and distribute your application, please ensure to include the protected version of your executable file 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\)

         End-user utilities (optional)

 

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

Licensing Protected Applications

By implementing Machine License, you can license the protected application by generating the License Key to be returned to the user. The following instructions describe how to use LicenseKey Manager to generate a License Key.

To Generate a 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 button.

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

4.       From the Implementation drop-down list:

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

6.       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.

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.