如何在C#中以编程方式禁用(或重置)网络适配器

thi*_*-Me 5 .net c# windows-xp-embedded bluetooth

我需要在Windows XP Embedded上使用C#(.NET 2.0)以编程方式禁用网络适配器.

背景原因:在PC上安装蓝牙堆栈后,蓝牙PAN适配器会阻止蓝牙管理器程序(在系统托盘中运行).如果我禁用蓝牙PAN,那么蓝牙管理器工作正常.

此问题仅在Windows XP Embedded计算机上发生.

unr*_*boy 2

尝试这个:

netsh interface set interface "YOUR_ADAPTOR" DISABLED
Run Code Online (Sandbox Code Playgroud)