G
Guest
I've set my lan connection ip to static, 192.168.0.1. I also have a dial-up
connection to the internet, the ip is dynamic and is assigned by my provider
when I connect to the internet. I am trying to find out my dial-up internet
address through WMI, but it always returns only my static lan ip! How do I
find out my dynamic dial-up IPv4 address through WMI without setting my lan
IPv4 address to automatic detection? I need it to stay statically assigned to
this lan ip.
Here's the script I am using:
-----------------------------
Set objWMIService = GetObject("winmgmts:\root\cimv2")
Set colFiles = objWMIService.ExecQuery("select IPAddress from
Win32_NetworkAdapterConfiguration where Description = 'Realtek RTL8168/8111
Family PCI-E Gigabit Ethernet NIC (NDIS 6.0)'")
For Each oInstance In colFiles
For Each oProperty In oInstance.Properties_
For Each prop in oInstance.ipaddress
if oProperty.name = "IPAddress" then
Wscript.Echo oProperty.name & " " & prop
end if
Next
next
next
connection to the internet, the ip is dynamic and is assigned by my provider
when I connect to the internet. I am trying to find out my dial-up internet
address through WMI, but it always returns only my static lan ip! How do I
find out my dynamic dial-up IPv4 address through WMI without setting my lan
IPv4 address to automatic detection? I need it to stay statically assigned to
this lan ip.
Here's the script I am using:
-----------------------------
Set objWMIService = GetObject("winmgmts:\root\cimv2")
Set colFiles = objWMIService.ExecQuery("select IPAddress from
Win32_NetworkAdapterConfiguration where Description = 'Realtek RTL8168/8111
Family PCI-E Gigabit Ethernet NIC (NDIS 6.0)'")
For Each oInstance In colFiles
For Each oProperty In oInstance.Properties_
For Each prop in oInstance.ipaddress
if oProperty.name = "IPAddress" then
Wscript.Echo oProperty.name & " " & prop
end if
Next
next
next