Retrieve Ethernet Adapter

bpayne111

Well-known member
Joined
Feb 28, 2003
Messages
326
Location
BFE
ok if you run ipconfig/all youll see a line that says Ethernet Adapter
somtimes this adapter has a huge hex value next to it.

id like to be able to run ip config and extract this crazy hex value from it.

any ideas?

thanks
brandon
 
you could add a reference to System.Management , then retrieve the Mac Addresses of any network cards like this ...
Code:
/// add a reference to System.Management , then use the following code.
        Dim mObject As New Management.ManagementClass("Win32_NetworkAdapter")
        Dim mCol As Management.ManagementObjectCollection = mObject.GetInstances
        Dim m As Management.ManagementObject

        For Each m In mCol
            Console.WriteLine(m.Properties("MACAddress").Value)
        Next
 
hey thanks...

thats some great code but the mac address isnt what im looking for.
the property im looking for well im not really sure of the name. (i cant even think of how to explain it)

how could i make that return all properties for the adapter? so i can browse through them and get the thing im looking for?

ohh and just so you know why im looking for this info... (to show its for good purpose)
im trying to check a registry entry for users on our vpn, to ensure it was input correctly. if not i want to add the value myself.)


thanks
brandon
 
actually im looking for the name of the adapter.
i got the value i want but it took 100 lines of code to do it
thanks for the link though ill keep that code on file


brandon
 
Back
Top