H.H. Posted December 13, 2005 Report Share Posted December 13, 2005 Hi I need to get the status on a specific network attached to the computer. I have several network adapters attached to the computer. I can get the information from the Windows Task Manager manualy, but I need LV (7.1) to do it. Perhaps its possible to get the info from the regdb, but I havent found it Can anyone help?? BG HH Quote Link to comment
Jim Kring Posted December 13, 2005 Report Share Posted December 13, 2005 One simple way is to use System Exec.vi to obtain this information using the ipconfig utility. Use the command "cmd.exe" and the input string "ipconfig /all[CRLF]" (where [CRLF] is a carriage return + line file). This will output something similar to the following: C:\WINDOWS\system32>ipconfig /allWindows IP Configuration Host Name . . . . . . . . . . . . : mycomputer Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : mydomain.com Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : mydomain.com Description . . . . . . . . . . . : Broadcom 440x 10/100 Integrated Conroller #3 Physical Address. . . . . . . . . : 00-0F-1F-26-A7-1D Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.1.103 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DNS Servers . . . . . . . . . . . : 192.168.1.1 Lease Obtained. . . . . . . . . . : Sunday, December 11, 2005 10:21:35 PM Lease Expires . . . . . . . . . . : Wednesday, December 14, 2005 10:21:35 PM Ethernet adapter Wireless Network Connection: Connection-specific DNS Suffix . : mydomain.com Description . . . . . . . . . . . : Dell TrueMobile 1300 WLAN Mini-PCI Card #3 Physical Address. . . . . . . . . : 00-90-4B-B3-2B-38 Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.1.104 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DNS Servers . . . . . . . . . . . : 192.168.1.1 Lease Obtained. . . . . . . . . . : Monday, December 12, 2005 10:50:11 PM Lease Expires . . . . . . . . . . : Thursday, December 15, 2005 10:50:11 PM C:\WINDOWS\system32> You can parse this output string and to determine the status of your adaptors. Quote Link to comment
m3nth Posted December 13, 2005 Report Share Posted December 13, 2005 The more basic information of just your different IP #'s and Computer ID's can also be obtained by placing the String to IP function and then right-clicking to selecting multiple outputs. This yields a U32 array that can be converted in a for loop using the IP to String function to return names and dot-notation IP #'s. Also if you're looking for the connection status of a specific device on your network there is code availalbe (I believe it's on NI's website somewhere) that will let you monitor the ping time natively (using raw winsock calls, as compared to performing a shell exec of the ping command) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.