MAC address for client M/c
-
hi how can i get MAC address of client machine which is unique number not of server ?
Thanks bye
How you do that depends on the networking environment the machines are in. If you're talking about any "client" machine on the Internet, you can't. You'll get the MAC address of the last hop that put the packet on your network. If you're talking about a local area network, there are other issues that must be accounted for.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
hi how can i get MAC address of client machine which is unique number not of server ?
Thanks bye
Hi, I am not sure if I fully understand your question, but you can try this snippet. Dim mgmt As Management.ManagementClass = New Management.ManagementClass("Win32_NetworkAdapterConfiguration") Dim mcol As Management.ManagementObjectCollection = mgmt.GetInstances() For Each o As Management.ManagementObject In mcol If o.Item("IPEnabled") = True Then MsgBox(o.Item("MacAddress").ToString()) End If Next for more info please go to http://msdn2.microsoft.com/en-us/library/aa394217.aspx[^] Note: Add a reference to System.Management.dll Hope this helps :)
NajiCo http://www.InsideVB.NET[^] It's nice 2b important, but it's more important 2b nice...
-
Hi, I am not sure if I fully understand your question, but you can try this snippet. Dim mgmt As Management.ManagementClass = New Management.ManagementClass("Win32_NetworkAdapterConfiguration") Dim mcol As Management.ManagementObjectCollection = mgmt.GetInstances() For Each o As Management.ManagementObject In mcol If o.Item("IPEnabled") = True Then MsgBox(o.Item("MacAddress").ToString()) End If Next for more info please go to http://msdn2.microsoft.com/en-us/library/aa394217.aspx[^] Note: Add a reference to System.Management.dll Hope this helps :)
NajiCo http://www.InsideVB.NET[^] It's nice 2b important, but it's more important 2b nice...
I didn't give him this answer because I don't know if he's looking for the MAC address of machine in his local segment, if he needs the MAC on machines other than Windows, if this has to work on the Internet, ... I firmly believe that if you ask a question in less than 150 words, you've left out important details that are required to give an accurate answer...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007