Solved

Detect individual Hardware GUID number (like punkbuster)

Posted on 2004-09-21
3
300 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

630 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