断网自动重连接代码CMD.bat
@echo off
ping -n 10 127.0.0.1 >nul
:Begin
ping www.163.com
if errorlevel 1 goto Reboot
if errorlevel 0 goto Continue
:Continue
goto Begin:
:Reboot
netsh interface set interface name="本地连接 3" admin=disabled
netsh interface set interface name="本地连接 3" admin=enabled
echo %Date:~0,4%-%Date:~5,2%-%Date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2% 断网已重启,等待延时8秒...>>ping.txt
::设置延时等待
ping -n 8 127.0.0.1 >nul
goto Begin
本站声明:网站内容来源于网络,如有侵权,请联系我们https://www.qiquanji.com,我们将及时处理。
微信扫码关注
更新实时通知