473,385 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

find uniq no from pc

blossam
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
5 2171
kenobewan
4,871 Expert 4TB
Welcome to the site. Sorry I can't undertand your question.
May 30 '07 #2
Plater
7,872 Expert 4TB
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
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
7,872 Expert 4TB
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
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

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

Similar topics

9
by: Martin Foster | last post by:
Hi. I would like to be able to mimic the unix tool 'uniq' within a Perl script. I have a file with entries that look like this 4 10 21 37 58 83 111 145 184 226...
0
by: amit | last post by:
I want to find out that if there is a mechanism to find a text inside a C# file and replace it with another string. I am using DTE to do it, the find proerty does it, the results are getting...
0
by: AMIT PUROHIT | last post by:
hi, this is a qry which I m stuck up with I want to find out that if there is a mechanism to find a text inside a C# file and replace it with another string. I am using DTE(EnvDTE) to do it,...
0
by: amit | last post by:
hi I have created a tool which does a find and replace thru DTE, now after it is done, it opens up a window, "FIND REACHED THE STARTING POINT OF SEARCH" I want to disbale this window...
5
by: Mike Labosh | last post by:
In VB 6, the Form_QueryUnload event had an UnloadMode parameter that let me find out *why* a form is unloading, and then conditionally cancel the event. In VB.NET, the Closing event passes a...
3
by: DJTN | last post by:
I'm getting the following error when I try to compile my setup project in VS 2002. I have re-installed the .net framework 1.1 and it didnt solve the problem. WARNING: Unable to find dependency...
3
by: David T. Ashley | last post by:
Hi, Red Hat Enterprise Linux 4.X. I'm writing command-line PHP scripts for the first time. I get the messages below. What do they mean? Are these operating system library modules, or...
0
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema...
2
by: samuelberthelot | last post by:
Hi, I have the following generated dynamically in my page : how can I access the li element matching a given catid and flagid ? <div id="flagList_500" class="CuttingFlagOpts" > <ul...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.