By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,728 Members | 2,490 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,728 IT Pros & Developers. It's quick & easy.

find uniq no from pc

blossam
P: 29
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.
May 30 '07 #1
Share this Question
Share on Google+
5 Replies


kenobewan
Expert 2.5K+
P: 4,871
Welcome to the site. Sorry I can't undertand your question.
May 30 '07 #2

Plater
Expert 5K+
P: 7,872
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.
May 30 '07 #3

P: 5
MAC address of NIC of your computer must be UNIQUE.

Following is the code to get the MAC address

//Requires a reference for System.Management

public string GetMACAddress()
{
ManagementObjectSearcher objMgmtSearcher;
ManagementObjectCollection objCollection;

objMgmtSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapter");
objCollection = objMgmtSearcher.Get();

StringBuilder strTable = new StringBuilder();

strTable.Append("<table><tr><td>Caption</td><td>Mac Adddress</td></tr>");
foreach (ManagementObject 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.ToString();
}
May 30 '07 #4

Plater
Expert 5K+
P: 7,872
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)
May 30 '07 #5

blossam
P: 29
MAC address of NIC of your computer must be UNIQUE.

Following is the code to get the MAC address

//Requires a reference for System.Management

public string GetMACAddress()
{
ManagementObjectSearcher objMgmtSearcher;
ManagementObjectCollection objCollection;

objMgmtSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapter");
objCollection = objMgmtSearcher.Get();

StringBuilder strTable = new StringBuilder();

strTable.Append("<table><tr><td>Caption</td><td>Mac Adddress</td></tr>");
foreach (ManagementObject 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.ToString();
}
hi, thanks for reply me and help me
May 31 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.