XK8ER
XK8ER

Reputation: 780

Disable network adapter without WMI

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..

Upvotes: 1

Views: 2123

Answers (1)

Carlos Landeras
Carlos Landeras

Reputation: 11063

You can do something like this:

Process.Start("cmd.exe","/c netsh interface set interface 'Local Area Connection' DISABLED");

Upvotes: 2

Related Questions