You will need to run this as Administrator.
Copy to Clipboard
@echo off
set message=Press C to cancel this script.
set delay=10
set interface=Ethernet
set /a count = 0
echo Starting disabling of '%interface%'interface. It will be disabled every %delay% seconds.
:start
set /a count += 1
echo.
echo.
echo Disabling Ethernet... Loop #%count%
netsh interface set interface "%interface%" disabled
CHOICE /C CL /M "%message%" /D L /T %delay% /N
if '%ERRORLEVEL%'=='1' goto done
echo Enabling Ethernet... Loop #%count%
netsh interface set interface "%interface%" enabled
CHOICE /C CL /M "%message%" /D L /T %delay% /N
if '%ERRORLEVEL%'=='1' goto done
echo.
echo ----------------------
goto start
:done
echo Enabling interface "%interface%"...
netsh interface set interface "%interface%" enabled
echo All done!
timeout 3
|