CraigLazar
asked on
Get ip address and network info vb.net
Hi,
I have written a small app in vb.net 08 and i need to somehow fetch the IP address(s) plus, subnet mask, default gateway and DNS server info if possible from a machine
thanks allot
cheers
I have written a small app in vb.net 08 and i need to somehow fetch the IP address(s) plus, subnet mask, default gateway and DNS server info if possible from a machine
thanks allot
cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Dhaest,
Thanks for the code,
i got ur first post working, but i checked on MSDN and see that using Win32_NetworkAdapterConfig uration, there is no property to indicate wheather the ip is connected or not.
I need to report all the netwrok adapters with there information and if they are connected or not
is that possible?
thanks
Thanks for the code,
i got ur first post working, but i checked on MSDN and see that using Win32_NetworkAdapterConfig
I need to report all the netwrok adapters with there information and if they are connected or not
is that possible?
thanks
>> I need to report all the netwrok adapters with there information and if they are connected or not
That's another question than the original question where you asked for the address(s) plus, subnet mask, default gateway and DNS server info if possible from a machine
I'm not sure if you can see this !
That's another question than the original question where you asked for the address(s) plus, subnet mask, default gateway and DNS server info if possible from a machine
I'm not sure if you can see this !
ASKER
Hi Hhaest,
Ok i found hte Class librabries for WMI on Microsofts web site. There are a number of Netwotk classes. And i have found that i need to use a combination of Win32_NetworkAdapterConfig uration and Win32_NetworkAdapter and link it by Mac Address which is common in both calls to then be able to show in a select statement the details that i need
thanks allot for the help
http://msdn.microsoft.com/en-us/library/aa394582(VS.85).aspx
cheers
Ok i found hte Class librabries for WMI on Microsofts web site. There are a number of Netwotk classes. And i have found that i need to use a combination of Win32_NetworkAdapterConfig
thanks allot for the help
http://msdn.microsoft.com/en-us/library/aa394582(VS.85).aspx
cheers
If f.OperationalStatus = OperationalStatus.Up Then
For Each d As GatewayIPAddressInformatio
MessageBox.Show(d.Address.
Next
End If
Next