Reed Kimble - "When you do things right, people won't be sure you've done anything at all" Result.AppendFormat("Address: ", gatewayinfo.Address) If adapter.Supports(4) Thenĭim info As = adapter.GetIPPropertiesįor Each addressinfo As In info.UnicastAddresses If adapter.OperationalStatus = AndAlso Not adapter.NetworkInterfaceType = Then Objects: Public Function GetActiveIpV4AddressInfo() As Stringĭim result As New įor Each adapter As In .GetAllNetworkInterfaces Take a look at IPInterfaceProperties and the UnicastIpAddressInformation and GatewayIpAddressInformation You do not need to use command prompt programs or WMI. :) I can only surmise that is due to Global Warming of the threads.Īll of this information is available from classes in the namespace. Will somehow become "unstable" or something to that effect. Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image
RichTextBox1.AppendText("Uses WINS: " & & vbCrLf & vbCrLf & vbCrLf) RichTextBox1.AppendText("MTU Setting: " & & vbCrLf) RichTextBox1.AppendText("DHCP Enabled: " & & vbCrLf) RichTextBox1.AppendText("Dynamic DNS: " & & vbCrLf)ĭim IPv4 As IPv4InterfaceProperties = 4Properties RichTextBox1.AppendText("DNS Enabled: " & & vbCrLf) RichTextBox1.AppendText("DNS entry: " & DnsAddress.ToString & vbCrLf)ĭim IPProp As IPInterfaceProperties = networkCard.GetIPProperties RichTextBox1.AppendText("Gateway: " & & vbCrLf)įor Each DnsAddress In RichTextBox1.AppendText("IP Address and Subnet: " & & ". ' Get IP Address(es) and subnet(s) informationĭim IpAddress As UnicastIPAddressInformationįor Each IpAddress In RichTextBox1.AppendText("Interface GUID: " & networkCard.Id & vbCrLf & "Name: " & networkCard.Id & vbCrLf & "Description: " & networkCard.Description & vbCrLf & "Status: " & & vbCrLf & "Speed: " & (networkCard.Speed / 1000000).ToString("#,000") & " Mbps" & vbCrLf & "MAC Address: " & & vbCrLf) ' if gateway address is NOT 0.0.0.0 and the network card status is UP then we've found the main network card
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Loadįor Each networkCard As NetworkInterface In NetworkInterface.GetAllNetworkInterfacesįor Each gatewayAddr As GatewayIPAddressInformation In
It will also execute the code using a console app to show you whatĪlthough this code seems to do it. WMI Code Creator which will create code in vb script or VB.Net or C# (depending on which one you choose in it to create the code in) and see if you can get it to create the proper code. List1.AddItem "GATE:" & vbTab & vbTab & Join(.DefaultIPGateway) List1.AddItem "MASK:" & vbTab & vbTab & Join(.IPSubnet) List1.AddItem "IP:" & vbTab & vbTab & Join(.IPAddress) "SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True") OAdapters = GetObject("winmgmts:").execquery( _ ' alle verfügbaren Netzwerk-Adapter mit IP-Adresse List1.AddItem "Name:" & vbTab & Environ$("computername") In the meantime, it remains just a basic solution with minor problems and only a few customization options.I don´t use ping, because it is tool from old MS-DOS-times.
NetPing works flawlessly on all Windows versions except for Windows 7, as the application crashes every time during a pinging task on this particular operating system.īut all in all, NetPing is a nice small utility and in case the developer fixes these compatibility issues with Windows 7, it could become an important product for a handful of users. There's not much to configure about the program, as the configuration screen lets you enable a beep at the end of the pinging session, but also to select the columns you wish to see in the main window. While you're prompted to input the start and the end addresses, NetPing can show the address, hostname, response time, notes, memory, operating system, processor, uptime and space of Windows drive, of course supposing you have access to the selected computer. You may be surprised by the clean look it provides, as the main window basically comes down to the IP range you wish to scan and the final results, including the information it displays. It's not such a complex piece of software, but the amount of information it can provide on the selected IPs is pretty remarkable, mostly when taking into consideration the limited number of configuration options it provides. NetPing is a lightweight Windows tool designed to ping a range of IPs and get information on each of them.