Disable/Enable "Local Area Connection" using DEVCON

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I was following up on a different thread and need to disable/enable a
network connection, specifically "Local Area Connection" using a command line
utility so that I can package it in a batch file. It turns out that DEVCON
may be of help. A thread from 7/05 talks about it, but it doesn't go deep
enough to outline the way to get to the connection. The help for devcon is
not helping enough to suggest a way to isolate the connection.

Can someone with DEVCON experience suggest a way to disable the connection?
Novell has a utility called NETSHX that can do it for their networks. This
will probably be a nice tip for some people! WINDOWSITPRO seems to have an
article that covers this topic but it's for subscribers only. :-|

Thanks.
 
this will find the network adaptor ids
devcon listclass net
the string you need is up to the first '&'
then for example for my wireless network card this disables it
devcon disable PCI\VEN_10EC

hth

philip ashley
 
Thanks Philip, your answer was right on the dot, in the context!

But ... the bad news is that it works only partially!

If you DISABLE from the GUI connection icon, and then try enabling through
devcon, it doesn't work. But, then if you ENABLE from the GUI connection
icon, and then try disabling through devcon, it will stop the traffic even
though the light on the port will stay on (indicating a live connection
between the machine and the hub). I'm using regular ethernet port, so there
is a light that I can check.

So, as the old thread from july 2k5 was suggesting, there seems to be
something else that the GUI action of DISABLE from the icon seems to be
doing, which is not completely matched by the devcon action. Devcon seems to
take care of part of it at the lower layer of data traffic, but not the part
that opens/closes the communication signals between the machine and the
router.

My objective is to basically script the action taken by the GUI part of
disabling and enabling a connection. I hope there is some solution to this.

Thanks.
 
!!
Warning: I can't recall the exact sequence, but I just ran into a blue
screen after tinkering with devcon combined with GUI manipulation
(disable/enable) of the connection. Watch out!
!!
 
try disabling the corresponding packet scheduler miniport as well

hth

philip ashley
 

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