Re: Getting MAC Address
- From: "Michael Jackson" <michaeldjackson@xxxxxxx>
- Date: Wed, 12 Oct 2005 17:56:03 -0500
Thanks for you help. I acutally used IPEnabled to filter. Seems to work.
Michael
"Phil Wilson" <pdjwilson@xxxxxxxxxxxxxx> wrote in message
news:edEzaK0zFHA.1252@xxxxxxxxxxxxxxxxxxxxxxx
>I suggest you look at some of the other attributes to filter out what you
>want, such as AdappterType. You're seeing all the network providers
>available. What you want is something like a NetConnectionID value of
>"Local Area Cionnection".
> --
> Phil Wilson
> [Microsoft MVP-Windows Installer]
>
> "Michael Jackson" <michaeldjackson@xxxxxxx> wrote in message
> news:FlV2f.9345$417.1763@xxxxxxxxxxxxx
>> I'm using the following code to get the MAC Address from the PC. The
>> actual MAC Address of the PC is 8th and 9th in the list (following the
>> code). How do I get just the MAC Address I need? Why are there so many
>> entries?
>>
>>
>> Dim objManagementClass As New ManagementClass(New
>> ManagementPath("Win32_NetworkAdapter"))
>>
>> Dim colManagementObjects As ManagementObjectCollection =
>> objManagementClass.GetInstances
>>
>> For Each objMO As ManagementObject In colManagementObjects
>>
>> Me.lstGeneric.Items.Add(IIf(IsNothing(objMO("MACAddress")), "Nothing",
>> objMO("MACAddress")))
>>
>> Next
>>
>> Output from the code is:
>>
>> Nothing
>> 20:41:53:59:4E:FF
>> Nothing
>> 50:50:54:50:30:30
>> 33:50:6F:45:30:30
>> Nothing
>> Nothing
>> 00:0D:61:26:94:C8
>> 00:0D:61:26:94:C8
>> 62:FF:20:52:41:53
>> Nothing
>>
>> Thanks,
>> Michael
>>
>
>
.
- References:
- Re: Getting MAC Address
- From: Phil Wilson
- Re: Getting MAC Address
- Prev by Date: access ldap
- Next by Date: .Net Excel Add-in missing images in ListView
- Previous by thread: Re: Getting MAC Address
- Next by thread: OK with 1.1, System.IndexOutOfRangeException with 2
- Index(es):
Relevant Pages
|