473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

disable/enable a network card using c#

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 !

Nov 17 '05 #1
1 5900
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

"knopper" <on*****@gmx.net> wrote in message
news:12****************************@phx.gbl...
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 !

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Derek White | last post by:
Ok here's the deal. We are finally getting DSL again... but our PC is in the living room... and the youngest has figured out that if he hits the right keys... he can bring up Internet Explorer....
1
by: Fil | last post by:
Can anyone tell me how can I enable or disable a network interface card Thanks for any help.
0
by: buck | last post by:
I am looking for a way to disable and active network card using c#. I have a laptop that has two network cards, cardA and cardB. When cardA is connected to a Lan I want to disable cardB. If...
1
by: Nick Z. | last post by:
How can I disable/enable network adapters in C#? Thanks, Nick Z.
2
by: Andre Ranieri | last post by:
I'm retouching our corporate web site that, among other things, allows customers to log in and pay their invoices online. I noticed that on the checkout page, the credit card number textbox...
0
by: 4AspNet | last post by:
Hello. I need to disable and then enable Local Network Connection (Ethernet). Here is my code: IPGlobalProperties computerProperties = IPGlobalProperties.GetIPGlobalProperties();...
10
by: Gary Jefferson | last post by:
Suppose I have 3 modules that belong to a project, 'A', 'A.a' and 'B', and each module has its own logger, created with: module1logger = logging.getLogger('project.A') and module2logger =...
4
by: Phoe6 | last post by:
Hi all, I am trying to disable the NIC card (and other cards) enabled in my machine to test diagnostics on that card. I am trying to disable it programmatic using python. I checked python wmi and...
0
by: Eran.Yasso | last post by:
Hi all, The following code sets/disables network adpter's status. Since I have no idea where to put this code and I wish to share the community with it. I did rverse engineering from VBS to C#....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.