John Nuñez
John Nuñez

Reputation: 1830

Unique Hardware ID on VB.NET

I have an application I want to protect by requiring my users to register. I also want to ensure that they can't install on more than two machines. To do this I need to know where to find a unique hardware ID number, and utilize that in the registration code. All I need to know is how to get that number using code.

Upvotes: 1

Views: 2332

Answers (1)

Steven Doggart
Steven Doggart

Reputation: 43743

As others have pointed out, there is really no such thing as a unique hardware ID. Others who have come before you have tried to use various things (e.g. motherboard serial number, CPU serial number, HDD serial number, MAC address) or combinations of those things, but they are all problematic in their own way. Serial numbers are not always returned by all drivers and even if they do, they can easily change if the hardware is upgraded or replaced. Also, the serial numbers can technically be repeated by different vendors and especially on virtual machines. MAC addresses are problematic because there are often multiple and they change often, especially with VPN's. Also, MAC addresses are often duplicated by multiple machines using the same VPN software. You could use the Windows Installation serial number, but this can also be duplicated and changes with OS upgrades. The simple answer is, when possible, don't. If you must do something like this, it would be better to have a way to programmatically mark each computer that your software is installed on by writing an encrypted GUID to someplace on the harddrive and provide an easy mechanism for your support staff to retag any computer at will.

Upvotes: 2

Related Questions