没有WMI禁用网络适配器 [英] Disable network adapter without WMI

查看:190
本文介绍了没有WMI禁用网络适配器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了一些答案对谷歌描述了如何使用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");

这篇关于没有WMI禁用网络适配器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆