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

Unique Identifier for a machine

P: n/a
Hello,

We are trying to figure out how to get a unique identifier for a machine.
Our application is a C# windows application that talks to our server via a
webservice. Every time our webservice is called, we want to verify that the
user has a valid license. For that we want to identify the user via his/her
machine. I tried using the following

searcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");

foreach(ManagementObject wmi_HD in searcher.Get())

{

HardDrive hd = new HardDrive();

hd.Model = wmi_HD["Model"].ToString();

hd.Type = wmi_HD["InterfaceType"].ToString();

hdCollection.Add(hd);

}

searcher = new ManagementObjectSearcher("SELECT * FROM
Win32_PhysicalMedia");
int i = 0;

foreach(ManagementObject wmi_HD in searcher.Get())

{

// get the hard drive from collection

// using index

HardDrive hd = (HardDrive)hdCollection[i];

// get the hardware serial no.

if (wmi_HD["SerialNumber"] == null)

hd.SerialNo = "None";

else

hd.SerialNo = wmi_HD["SerialNumber"].ToString();
++i;

}
In most cases, I get serial number. But in a few cases, I get serial number
for the hard drive as zero. Is there any other way to uniquely identify the
user's machine.

Thanks,
-Nitin
Jul 21 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Hi Nitin,
Is there any other way to uniquely identify the user's machine.


For your information:
DomainName+ComputerName,
NIC's MAC Address
Processor's Serial Number
Wish it helps!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Jul 21 '05 #2

P: n/a
Gary,

thanks for the info. However, the processor id is not available on P3 and
below and I did not find it on Windows 98 machine. Any other ideas are
welcome.

But this looks like a good starting point.

Thanks,
-Nitin
""Gary Chang"" <v-******@online.microsoft.com> wrote in message
news:FU**************@cpmsftngxa10.phx.gbl...
Hi Nitin,
Is there any other way to uniquely identify the user's machine.


For your information:
DomainName+ComputerName,
NIC's MAC Address
Processor's Serial Number
Wish it helps!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------

Jul 21 '05 #3

P: n/a
Hi Nitin,

Thanks for your response!

If you have the difficulty to query the Processor Serial number, I think
the Network Adapter's MAC address should be a good choice...
Good Luck!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Jul 21 '05 #4

P: n/a
Thanks Gary. Unfortunately, this solution may not work as some of our
clients may not have a Network Adapter (still using Dial-up).

Is there any other option available?

Thanks,
-Nitin
""Gary Chang"" <v-******@online.microsoft.com> wrote in message
news:%2****************@cpmsftngxa10.phx.gbl...
Hi Nitin,

Thanks for your response!

If you have the difficulty to query the Processor Serial number, I think
the Network Adapter's MAC address should be a good choice...
Good Luck!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------

Jul 21 '05 #5

P: n/a
Hi Nitin,
Is there any other option available?


Just for your information, the IP address that the machine is currently
used and maybe you can generate a GUID for your program when the program is
installing to the customer's machine...
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Jul 21 '05 #6

P: n/a
I will try that. Do you know how Microsoft ensures this? If the machine does
not have network card or cannot get processor id. I am thinking of using the
serial number of operating system along with the date and time of install.
Do you think this will be unique enough?

Thanks,
-Nitin

""Gary Chang"" <v-******@online.microsoft.com> wrote in message
news:HI**************@cpmsftngxa10.phx.gbl...
Hi Nitin,
Is there any other option available?


Just for your information, the IP address that the machine is currently
used and maybe you can generate a GUID for your program when the program
is
installing to the customer's machine...
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------

Jul 21 '05 #7

P: n/a
Hi Nitin,

As far as I know, the Windows' Serial Number is not unique per each
system...
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Jul 21 '05 #8

P: n/a
Does anyone know how Microsoft or other leading companies do it?

""Gary Chang"" <v-******@online.microsoft.com> wrote in message
news:MN**************@cpmsftngxa10.phx.gbl...
Hi Nitin,

As far as I know, the Windows' Serial Number is not unique per each
system...
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------

Jul 21 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.