rem switch.bat
@echo off
@ping -n 1 192.168.0.1 [email=|@find]|@find[/email] "Reply"
if %ERRORLEVEL%==1 goto cnc else goto tel
rem 打开网上邻居,查看网卡名是否是“本地连接”,不是的话,修改。
:cnc
interface ip set address name="本地连接" source=static addr=192.168.2.222 mask=255.255.255.0 gateway=192.168.2.245 gwmetric=1
:tel
interface ip set address name="本地连接" source=static addr=192.168.0.222 mask=255.255.255.0 gateway=192.168.0.1 gwmetric=1