Solved

Detect individual Hardware GUID number (like punkbuster)

Posted on 2004-09-21
3
294 Views
Last Modified: 2012-06-27
Hello,

i read the news on PunkBuster ( http://www.punkbuster.com/index.php?page=announce.php ) and i saw the new function called 'Detecting individual Hardware GUID' (i think it's the motherboard product number), and storing it in a hashcode so that the computer could be identified with a single hashcode. I found that pretty interesting.

So have you got some ideas how to get an individual hardware GUID hashcode (perhaps motherboard product number) ?

Thanks
Manuel K.
0
Comment
Question by:roflkind
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
thedude112286 earned 200 total points
ID: 12117970
Below, I give the code to find the HD serial numbers, CPU Id, and MAC address of a computer.  These can be combined to form a unique ID for a computer (This is essentially the info Microsoft uses to ID computers when registering Windows XP).  Lookup the Management class on msdn for more info.

using System.Management;

//Add HD serial numbers
ManagementClass mc = new ManagementClass("Win32_PhysicalMedia");
foreach ( ManagementObject mo in mc.GetInstances() ) {
    if ( mo["SerialNumber"] != null)
      data.DriveSerialNumbers.Add(mo["SerialNumber"].ToString());
    }
                  
//Add processor ID
mc = new ManagementClass("Win32_Processor");
foreach ( ManagementObject mo in mc.GetInstances() ) {
    if ( mo["ProcessorID"] != null ) {
         data.ProcessorID = mo.Properties["ProcessorId"].Value.ToString();
         break; // just log 1 processor
     }
}
           
//Add Mac Address of first network card
mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
foreach ( ManagementObject mo in mc.GetInstances() ) {
    if((bool)mo["IPEnabled"] == true)
        data.MacAddress = mo["MacAddress"].ToString() ;
    }
}
0
 
LVL 18

Assisted Solution

by:armoghan
armoghan earned 25 total points
ID: 12119694
for Motherboard's serial number
you can use

ManagementClass mc = new ManagementClass("Win32_BaseBoard");
      foreach ( ManagementObject mo in mc.GetInstances() ) {
            if ( mo["SerialNumber"] != null)
            Console.WriteLine(mo["SerialNumber"].ToString());
      }
0
 
LVL 7

Assisted Solution

by:God_Ares
God_Ares earned 25 total points
ID: 12123391
well the samples above will give you a how to,.. this link a reference to all wmi's

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_networkadapterconfiguration.asp

have fun!

regards Floris Briolas
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
c# DateTime Format validation 4 93
How to escape alias names for Oracle query 1 41
WPF and Powershell button hover change text 5 63
Can Selenium do Load Testing? 2 61
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question