Windows – Swapping from LAN to WLAN upon reaching a certain threshhold

batchlannetworkingwindows 10wireless-networking

The problem:

My desktop PC is connected via LAN/Network cable and DLAN (through electric powerline) with the router.

This connection is stable for most of the time, but after a random amount of time, I just get disconnected (still shows connected, but can't do anything online).

That's why I additionally put a WLAN card into my desktop PC.

I swap from LAN to WLAN every time said situation happens. Due to its frequency (4 to 5 times a day) and the fact that I play games most of the time I'm on my PC, this is a pretty time consuming and frustrating solution.

The question:

Do you know any software that can swap my connection once a certain download hreshhold is reached (it doesn't automatically swap, as the PC says I'm still connected (see above)).

If not so, is it possible to swap connections through batch? so I just have to click the batch and not through all the Windows menus?

Best Answer

Is it possible to swap connections through batch?

You can use netsh to enable and disable network connections both from the command line and in a batch file.

enablewifi.cmd:

netsh interface set interface "Local Area Connection" admin=disable
netsh interface set interface "Wireless Network Connection" Enable    

enablelan.cmd:

netsh interface set interface "Wireless Network Connection" Disable
netsh interface set interface "Local Area Connection" admin=enable

Notes:

  • Replace Local Area Connection and Wireless Network Connection with the interface names of your adapters.
  • Use netsh interface show interface to get the interface names.

Further Reading