Get VPN IP address via WMI on Vista -
How can we use WMI to remove the IP address of the VMP connection to all network connections? On XP, Win32_NetworkAdapterConfiguration works fine, but on Vista it only starts calculating physical connection ...
If you look at the comments under the documentation you will see a reference while working with Vista.
'Vista code only ??? Set ColAdapters = objWMIService.Execquery ("Select * from Win32_NetworkAdapter where NetEnabled = True") for each nic in colAdapters msg = "nic.DeviceId:" & amp; Nic.DeviceId & amp; VbCRLF _ & amp; "Nic.Name:" & amp; Nic.Name & amp; VbCRLF _ Next This allows you to retrieve the Interface Index and view the IP address from the class.
This is definitely Win32_NetworkAdapterConfiguration .
Comments
Post a Comment