Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
311 views
in Technique[技术] by (71.8m points)

.net - How to uniquely identify computer using C#?

How to uniquely identify computer (mainboard) using C#(.Net/Mono, local application)?

Edition. We can identify mainboard in .Net using something like this (see Get Unique System Identifiers in C#):

using System.Management;
...
ManagementObjectSearcher searcher = new ManagementObjectSearcher("select * from Win32_MotherboardDevice");
...

But unfortunately Mono does not support System.Management. How to do it under Mono for Linux? - I don't know :(

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Write a function that takes a few unique hardware parameters as input and generates a hash out of them.

For example, Windows activation looks at the following hardware characteristics:

  • Display Adapter
  • SCSI Adapter
  • IDE Adapter (effectively the motherboard)
  • Network Adapter (NIC) and its MAC Address
  • RAM Amount Range (i.e., 0-64mb, 64-128mb, etc.)
  • Processor Type
  • Processor Serial Number
  • Hard Drive Device
  • Hard Drive Volume Serial Number (VSN)
  • CD-ROM / CD-RW / DVD-ROM

You can pick up a few of them to generate your unique computer identifier.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...