How do I make this windows batch script stop restarting the adapter after 10 restarts?
Code:
@echo off
:loop
timeout /t 8
echo Checking...
ping -n 1 192.168.1.1|Findstr /I /C:"timed" /C:"unreachable" /C:"find host" /C:"failure"
if %errorlevel%==0 (echo Restarting...
netsh interface set interface name="Local Area Connection" admin="disabled"
netsh interface set interface name="Local Area Connection" admin="enabled")
goto loop