切换网卡的脚本


@echo off
netsh interface show interface name="无线网络连接3"|findstr "已连接"

IF ERRORLEVEL 1 goto 1
IF ERRORLEVEL 0 goto 0
:0
netsh interface set interface name="无线网络连接3" admin=DISABLED
netsh interface set interface name="本地连接 3" admin=ENABLED
goto end
:1

netsh interface set interface name="无线网络连接3" admin=ENABLED
netsh interface set interface name="本地连接 3" admin=DISABLED


:end

原文地址:https://www.cnblogs.com/cndavy/p/7654421.html