find uniq no from pc

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blossam
    New Member
    • May 2007
    • 29

    find uniq no from pc

    hi frnds,
    this is my first question, hope u will help me
    i want to find some uniw no from pc using which i can identify all pc uniqly
    like processor no, motherbord id or any processor serial no
    its urgent send my some sugge.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Welcome to the site. Sorry I can't undertand your question.

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      Check into WMI usage. You can pull BOATLOADS of information about a system with it.
      Including all those ID numbers you were looking for.

      I would suggest looking for MAC addys and maybe the windows product key?
      MAC addys are supposed to be unique, it's possible (and rather likely now-a-days) that a computer has multiple NIC cards, but you can get at all of them with the WMI interface.

      Comment

      • ghousebarq
        New Member
        • May 2007
        • 5

        #4
        MAC address of NIC of your computer must be UNIQUE.

        Following is the code to get the MAC address

        //Requires a reference for System.Manageme nt

        public string GetMACAddress()
        {
        ManagementObjec tSearcher objMgmtSearcher ;
        ManagementObjec tCollection objCollection;

        objMgmtSearcher = new ManagementObjec tSearcher("SELE CT * FROM Win32_NetworkAd apter");
        objCollection = objMgmtSearcher .Get();

        StringBuilder strTable = new StringBuilder() ;

        strTable.Append ("<table><tr><t d>Caption</td><td>Mac Adddress</td></tr>");
        foreach (ManagementObje ct objMgmt in objCollection)
        {
        strTable.Append ("<tr><td>" + objMgmt["caption"].ToString() + "</td>");
        if (objMgmt["MACAddress "] != null)
        strTable.Append ("<td>" + objMgmt["MACAddress "].ToString() + "</td>");
        else
        strTable.Append ("<td>-</td>");
        strTable.Append ("</tr>");
        }
        strTable.Append ("</table>");
        return strTable.ToStri ng();
        }

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          The reason I didn't put much reliance on the MAC is that many pieces of hardware nowadays support MAC-spoofing and thus you can produce duplicate MACs (although if that happened the network structure would be compromised let alone your software)

          But more over someone could keep changing their MAC and you would not be able to track them.

          Also, old NIC cards can have issues and lose their MACs (yes it does happen, physical corrosion on the card itself can cause bits to stick and other hardware issues)

          Comment

          • blossam
            New Member
            • May 2007
            • 29

            #6
            Originally posted by ghousebarq
            MAC address of NIC of your computer must be UNIQUE.

            Following is the code to get the MAC address

            //Requires a reference for System.Manageme nt

            public string GetMACAddress()
            {
            ManagementObjec tSearcher objMgmtSearcher ;
            ManagementObjec tCollection objCollection;

            objMgmtSearcher = new ManagementObjec tSearcher("SELE CT * FROM Win32_NetworkAd apter");
            objCollection = objMgmtSearcher .Get();

            StringBuilder strTable = new StringBuilder() ;

            strTable.Append ("<table><tr><t d>Caption</td><td>Mac Adddress</td></tr>");
            foreach (ManagementObje ct objMgmt in objCollection)
            {
            strTable.Append ("<tr><td>" + objMgmt["caption"].ToString() + "</td>");
            if (objMgmt["MACAddress "] != null)
            strTable.Append ("<td>" + objMgmt["MACAddress "].ToString() + "</td>");
            else
            strTable.Append ("<td>-</td>");
            strTable.Append ("</tr>");
            }
            strTable.Append ("</table>");
            return strTable.ToStri ng();
            }
            hi, thanks for reply me and help me

            Comment

            Working...