嗨使用cmd將用戶網絡規範打印到使用ipconfig> computer.txt的文本文件中。這方面的一個例子是使用vb.net從文本文件中挑選信息
Windows IP Configuration
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::cd7a:50b3:1284:865%12
IPv4 Address. . . . . . . . . . . : 10.0.0.26
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . : 10.0.0.1
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::5c3a:ae77:81:8cdf%11
IPv4 Address. . . . . . . . . . . : 10.0.0.25
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IPv4 Address. . . . . . . . . . . : 192.168.1.12
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.0.1
如何,我會用它來找到適配器默認網關的一個(X線下來,然後經過:
不知道這是做的正確的方式
如果不是,有什麼用vb.net
有更低層次的獲取該信息的方法,這將更加可靠和高效。點擊這裏查看很多好的想法和鏈接:http://www.msvisual.com/Installing-RAS-programmatically-t25743.html。 – mellamokb 2012-07-11 21:31:44