Uniquely identifying an installation is obviously crucial in terms of licensing. There are two ways to uniquely identify an (on-premise) installation.
In order to adequately protect your system (i.e., make sure a license key is not used on multiple machines), your software has to generate a unique device ID. This is usually a combination of:
- Processor ID
- Motherboard ID
- Machine ID
- (Virtual) MAC Address
- Other custom ID
As a vendor you (not SLASCONE) have to decide what suits more to your application, in other words how restrictive you want to be. In any case, this id is not being saved in your application, but generated every time its value is needed.
It should be noted though, that there is a trade-off between security and customer convenience. Increasing the number of identifiers (e.g., MAC + Processor ID), increases the probability of a new unique identifier upon hardware change.
SLASCONE recommends using UUID.
The simplest way to generate a unique device id on windows is to use the buid in “wmic” command:
wmic csproduct get UUID
Our code examples include such an implementation.
Here a nice reference to Linux UUIDs.
DeviceId is an open souce C# library that facilitates building custom composite device identifiers using a quick-and-easy fluent interface.
An alternative option to a hardware id, is to generate a random ID during the installation. Contrary to a hardware id, this id needs to be saved in your application, using some sort of encryption in order to avoid easy manipulation.