<< Click to Display Table of Contents >>
Navigation: WinLicense > FAQ > Registration > Common >
Please, can you give me a step by step guide about how to create licenses locked to my customers’ PCs?
1) Load your application in WinLicense and select the desired protection options.
2) Go to the Registration panel and enable the option “This application can be Registered...”. We will leave just “File License” option for this test. You can also select the option “Application only runs when registered” if you want that your application ONLY runs when a license key is present (that is, it will not run in Trial mode)
3) Go to the Hardware lock panel and select the items which will be checked from your protected application when a license with Hardware ID is present. We recommend you to uncheck the option “MAC” to avoid problems with special Wifi cards that change the MAC address from time to time
4) Protect your application
5) Now if you run your application and you enabled the option “Application only runs when registered”, you will see that a message requiring a license is displayed and your application will not run. You can change the text for that message in the Customized Dialogs panel (MSG_ID_LICENSE_REQUIRED_RUN)
6) Now, you can create Hardware locked licenses for your application. So, your application will *only* run in those computers where you create a license for them. Of course, you can create as many Hardware locked licenses as you desired without protecting your application again.
You can create licenses from the License Manager (top button bar in WinLicense) or using the WinLicenseSDK.dll. For this example, we will use the “License Manager”. So, open the License Manager and make sure that you have your Software created in the database and also the Customer that you will assign the license. From the Orders panel, you can create a new License, please, set the “Hardware Id” for your customer's PC, so you lock the license to be run only in that specific computer (Read below how to obtain the Hardware ID from your customer). Once you have inserted all the information, press “Save” and you will have generated a license in the database.
You can send the license via email, using the Email Manager in the License Manager.
7) Your application will run with the generated license key for the specific computer that you selected in the HardwareID field when you were creating the license in step 6)
How to obtain the Hardware ID from your customer
You can create a simple application which calls the function WLHardwareGetId. You can see an example of calling that function in the directory where you uncompressed WinLicense (WinLicenseSDK -> ExamplesSDK -> Trial Registration).
If you run your *unprotected* application which calls WLHardwareGetId, it will return a fake HardwareID taken from the file WinLicenseSDK.ini. When you protect your application, it will return a valid Hardware ID for the current computer. That’s the HardwareID that you have to put when creating the license for your customer.