Possible Duplicate:
What’s a good way to uniquely identify a computer?
As the title above, someone know how to generate a unique id like TeamViewer for licensing purpose in C#.
I want to call a function that should return 1 unique ID for a PC every time like TeamViewer. I want to use that like a hardware ID for license management.
You can use Guid.NewGuid method
Every time you call this method a new
Guidis generated.Edit: Based on your comments
Windows Management Instrumentation (WMI) is the thing you can use. For instance you can use the following code to get BIOS id’s of the system.
Similarly you can get other system information and work with it to generate a unique id of a system. Here is a good article on CodeProject from where you can take help. Please have a look.