Цитата Djedai:
поясните смысл 3 секунд после разрыва LAN? »
|
Не знаю, на всякий, как говорится, случай... Может оно и не нужно?
Вот полный текст скрипта:
Код:
![Выделить весь код](images/misc/selectcode.png)
@echo off
set ext_loc=www.ya.ru
set int_loc=<то_чё_пингую_во_внутренней_сети>
set ext_if=ByFly
set int_if=Local
echo Testing* %ext_if%...
ping %ext_loc% | find /i "TTL="
if %errorlevel%==1 ( echo Resetting* %ext_if%...
netsh interface set interface "%ext_if%" disable
sleep 3s
netsh interface set interface "%ext_if%" enable )
echo Done.
echo.
echo Testing* %int_if%...
ping %int_loc% | find /i "TTL="
if %errorlevel%==1 ( echo Resetting* %int_if%...
netsh interface set interface "%int_if%" disable
sleep 3s
netsh interface set interface "%int_if%" enable )
echo Done.
echo.
set ext_loc=
set int_loc=
set ext_if=
set int_if=