bat file to disable ethernet adaptor and then reenable it after windows log in

Posted by jaslr on Super User See other posts from Super User or by jaslr
Published on 2012-12-18T01:25:54Z Indexed on 2012/12/19 23:05 UTC
Read the original article Hit count: 200

Filed under:

When I log into Windows 7 I need to wait 10 seconds and then disable the Local Area Connection (ethernet adaptor) and then reenable it.

I have looked through the suggested answer: Enable/disable wireless interface in a bat file but that seems irrelevant as it just toggles the current state.

From what I can tell I need to include:

netsh interface set interface "Local Area Connection" DISABLED
netsh interface set interface "Local Area Connection" ENABLED

but I'm unsure of the wait time or how I can have this start after Windows has successfully logged in.

What's the best approach here?

© Super User or respective owner

Related posts about batch-file