Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.