Created
August 22, 2014 08:07
-
-
Save benwu232/a8a6cdcbabd741c3fbde to your computer and use it in GitHub Desktop.
Switch between WiFi and LAN in windows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Echo off | |
Echo Switch between LAN and WiFi | |
net start dot3svc | |
netsh wlan show interfaces >NUL | |
choice /C 12 /M "1: WiFi; 2: LAN" | |
if errorlevel 2 goto LAN | |
if errorlevel 1 goto WLAN | |
:LAN | |
Echo Turn on LAN and turn off WiFi | |
netsh interface set interface "Wi-Fi" Disable | |
sc start dot3svc >NUL | |
netsh interface set interface "Ethernet" Enable | |
goto end | |
:WLAN | |
Echo Turn on WiFi and turn off LAN | |
sc start dot3svc >NUL | |
netsh interface set interface "Wi-Fi" Enable | |
sc stop dot3svc >NUL | |
netsh interface set interface "Ethernet" Disable | |
:end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment