How to with VB.NET?

  • Thread starter Thread starter Mat
  • Start date Start date
M

Mat

-How to detect if computer has Network card? if yes, how to get his MAC
address?
-How to detect if computer has Modem PCI. if yes, how to get his unique
number?

How to Get Computer procesor unique ID or Motherboard unique ID?

Thanks you
 
Mat said:
-How to detect if computer has Network card? if yes, how to get his
MAC address?
-How to detect if computer has Modem PCI. if yes, how to get his
unique number?

How to Get Computer procesor unique ID or Motherboard unique ID?

I think, you didn't post to the most appropriate group(s):
microsoft.public.dotnet.framework.*
Means: There is no built-in VB.Net command, and it's also not an IDE
problem.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Hi,

You can use the wmi go get that. Add a reference to
system.management.dll.

Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select *
from Win32_NetworkAdapter where AdapterTypeID = 0")
Debug.WriteLine("Network")
moReturn = moSearch.Get
For Each mo In moReturn
Try
Debug.WriteLine(String.Format("{0} {1} ",
mo("Name").ToString, mo("MACaddress").ToString))
Catch
End Try
Next
Debug.WriteLine("End Network")
moSearch = New Management.ManagementObjectSearcher("Select *
from Win32_POTSModem")
Debug.WriteLine("Modems")
moReturn = moSearch.Get
For Each mo In moReturn
Try
Debug.WriteLine(String.Format("{0} {1} ",
mo("Name").ToString, mo("DeviceID").ToString))
Catch
End Try
Next
Debug.WriteLine("End Modems")

Ken
----------------------
 
Thank you.
i will try it.
Ken Tucker said:
Hi,

You can use the wmi go get that. Add a reference to
system.management.dll.

Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select *
from Win32_NetworkAdapter where AdapterTypeID = 0")
Debug.WriteLine("Network")
moReturn = moSearch.Get
For Each mo In moReturn
Try
Debug.WriteLine(String.Format("{0} {1} ",
mo("Name").ToString, mo("MACaddress").ToString))
Catch
End Try
Next
Debug.WriteLine("End Network")
moSearch = New Management.ManagementObjectSearcher("Select *
from Win32_POTSModem")
Debug.WriteLine("Modems")
moReturn = moSearch.Get
For Each mo In moReturn
Try
Debug.WriteLine(String.Format("{0} {1} ",
mo("Name").ToString, mo("DeviceID").ToString))
Catch
End Try
Next
Debug.WriteLine("End Modems")

Ken
 
Armin, don't be so territorial please!
Besides there is a microsoft.public.vsnet.ide group

Francisco
 
I"m interested in the reverse action.
Resolving MAC address to an IP. (local ip)

Anybody?

-AP
 
Back
Top