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
 
Back
Top