@echo off
echo "网卡自动重启服务正在进行中......."
:begin
ping qq.com>ping.txt
rem echo %errorlevel%
if %ERRORLEVEL% == 1 goto ping2
exit
:ping2
ping baidu.com>ping.txt
rem echo %errorlevel%
if %ERRORLEVEL% == 1 goto reboot
exit
:reboot
cmd /c netsh interface set interface name="本地连接" admin=DISABLED
cmd /c netsh interface set interface name="本地连接" admin=ENABLED
最新评论