In our Windows desktop .Net application, we have a licensing system where we bill for every mchine where our system is installed.
So far we've been using szHwProfileGuid
from GetCurrentHwProfile
to determine what we called "installation id". We confronted it with a license key from registry and when it matched we've allowed a user to log in.
It worked fine until Windows 10 came out, which changes szHwProfileGuid
every other update. This causes all of the license keys to become invalid.
Yes, I realize this mechanism is not bulletproof, but in our case it's good enough. I'm wondering though what would be the fastest way for us to substitute szHwProfileGuid
with something less volatile.
Requirements
- The value should be globally unique (number, guid or string) or at least it should be "close to unique".
- The value should be accessible form the system without the need of storing it
- The value should never change for a certain PC (a change when reinstalling Windows or changing hardware is acceptable, a change when Windows updates is unacceptable)
- Spoofing the number is not a concern
Using mac address crossed my mind, but maybe you guys have better ideas?