Enable/Disable Local Area Connection
-
My application re-configures the network settings (IP, Subnet Mask, Gateway, DNS..) and after that I want to disable and then enable the Local area connection (not the network card), so the connection is refreshed with the new settings without having to restart the computer. Does anybody have any idea on how to do it in C#? Thanks for your time. Radgar "Imagination is more important than knowledge." - Albert Einstein
-
My application re-configures the network settings (IP, Subnet Mask, Gateway, DNS..) and after that I want to disable and then enable the Local area connection (not the network card), so the connection is refreshed with the new settings without having to restart the computer. Does anybody have any idea on how to do it in C#? Thanks for your time. Radgar "Imagination is more important than knowledge." - Albert Einstein
You don't have to disable/enable to network card to get the settings to refresh. You can make the changes using WMI, but watch the return codes. No matter what method you chose to make those changes, Windows will tell you if the machine has to be restarted for the changes to take effect. Otherwise, in most cases, the changes you make take effect immediately. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome