@echo off
echo "网卡自动重启服务正在进行中......."
:begin
ping 218.85.157.99>D:\ping.txt
rem echo %errorlevel%
if %ERRORLEVEL% == 1 goto ping2
goto loop
:ping2
ping 218.85.152.99>D:\ping.txt
rem echo %errorlevel%
if %ERRORLEVEL% == 1 goto reboot
goto loop
:reboot
cmd /c netsh interface set interface name="NIC1" admin=disabled
cmd /c netsh interface set interface name="NIC1" admin=enabled