Enable or Disable Network Connections
Question:
I want to be able to enable or disable a network connection using WinBatch. That is, I want a "program equivalent" of
right-clicking "My Network Places", choosing Properties, right-clicking "Local Area Connection", and clicking Enable
(or Disable, as the case may be). The point is to be able to connect or disconnect a PC from the network.
Can't find the function to do this ...
Answer:
You can use devcon.exe utility.
http://support.microsoft.com/?kbid=311272
User Reply:
Thanks, Marty. The command "devcon disable =net" (and "devcon enable =net") do the trick!
Article ID: W16998
File Created: 2007:07:03:14:27:32
Last Updated: 2007:07:03:14:27:32