我找到了一些答案对谷歌描述了如何使用WMI来禁用网络适配器本地连接上的Windows 7和8。我还发现了一个方法,通过使用shell,但它仅适用于Windows XP。我想知道,如果它可以禁用适配器,而无需使用WMI使用C#或VB.NET code在Win7和Win8的。
I found a few answers on google describing how to disable the network adapter "Local Area Connection" on Windows 7 and 8 by using WMI. I also found a method by using shell but it only works with Windows XP. I would like to know if its possible to disable adapters without using WMI with C# or VB.NET code on Win7 and Win8..
您可以做这样的事情:
Process.Start("cmd.exe","/c netsh interface set interface 'Local Area Connection' DISABLED");