disable/enable a network card using c#

  • Thread starter Thread starter knopper
  • Start date Start date
K

knopper

Hi,

Any body know how to disable a network card using c# ?
Or to simulate a "cablbe unplugged". So the network card
sysmbol shows only a red x, however it a ether is still
plugged in.

thanks !
 
The answer has to revolve somewhere around WMI. Google on WMI and C# and
you'll get plenty of advice. Here's one interesting article that says (and
I have no first hand knowledge with setting hardware properties using WMI in
C#) that the .Net WMI classes will not let you set properties. If that is
actually the case, then you'd have to use interop or COM to get to the WMI
SDK.

HTH

Dale Preston
MCAD, MCDBA, MCSE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top