Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run a script that disconnects and reconnects to the internet. In cmd.exe I am using the lines

netsh interface set interface "Local Area Connection" disabled
netsh interface set interface "Local Area Connection" enabled

The disabled works as expected, and the enable line does re-enable the Local Area Connection but it doesn't reconnect to the internet, and I only get internet back if I restart my computer.

Further investigation showed that if I disabled the Local Area Connection and then enabled it manually via the device manager it failed to start, with error message: This device cannot start (Code 10).

Any ideas on what this problem is caused by, or another way to disconnect and reconnect to the internet using cmd.exe? Thanks.

(And I am using windows 7).

share|improve this question
    
What LAN card or controller do you have? Is this a USB device? (If USB, it can't be done. Once stopped, it's no longer connected and there's no way to send it a command to start again.) – David Schwartz Jan 31 '12 at 10:57

You must log in to answer this question.

Browse other questions tagged .