Often end users like to have several copies of your Software installed across their machines but they have not purchased enough licenses for every machine they wish to use. Or alternatively they wish to move a license to a new PC and de-commission the older one.
In these cases allowing the user to "move" a license from one PC to another can be very helpful, this maintains the EULA and rights they have purchased i.e. the number of PCs they have licensed from you but gives them freedom to use the Software in a way that's convenient.
In order to offer this to end users in V10+ of NLS you need to present your users with a UI for activation/de-activation so that they can easily perform this process, your UI can be any form you wish but typically its a dialog box and button where a license code can be input and de-activated, then re-activated at the new machine.
For V10+ of NSL where there is a heartbeat, this process is slightly different to older style activation due to the fact that the license is updated on the server-side regularly whereas that was not the case before.
To do this you simply need to use some basic API calls from Zentitle, to de-activate you would use this API.
There are two options that work differently for the end user experience and set of actions.
- If you wish to offer the user an option in the client UI:
To move a license From 1 computer to another you can use the ShaferFilechck function NSLReturnLicense.
On the source machine the user would run this function, via a button or process, and then they could re-activate your application on the new target machine with the same License Code. They could repeat as required to release the license for re-use, very simple and convenient.
|
int NSLReturnLicense(char *licenseNo, int *licenseStatus); |
Returns the current license to the Zentitle server. |
You can see the activation code/API in the sample code here:
http://support.nalpeiron.com/customer/portal/topics/572253-code-projects-and-essential-files---licensing-v10/articles?b_id=185
And the full API here:
http://support.nalpeiron.com/customer/portal/articles/1321408-nsl-v10-developers-api?b_id=185
- If you wish to control this on the server-side:
You can DELETE a machine instance from the server side, see managing licenses. This will delete the activation on the server side for that computer id, but if they run you application again on that source machine it will auto reactivate itself.
So if you DELETE the license from the server for the source computer, then run your application on the target machine with the same License code, then when the source clients lease interval is over it will not allow it to run anymore on this PC (if the number of clients allowed restricts this).
This will have the same effect as returning the license on the source computer, but using this method if the source computer is running it will continue to run locally until the client lease period has expired, as it will run with its local license until expired then contact the server again for an updated license (which the server will refuse if the number of clients is at its max).
Summary:
So the best method is to return the license on the source client computer using the function NSLReturnLicense, as then you will have no overlap of client machines (potentially up to the client lease period defined as in the server delete method).