@echo on
echo Nettest Script by Creature 0604
@echo off

ping 127.0.0.1 -n 1 > c:\temp\nettest.txt
find "TTL=" c:\temp\nettest.txt >NUL
IF NOT ERRORLEVEL 1 goto OK_ISE
echo ********************************
echo ** Enda yhendus puudub.
echo ********************************
goto FAILED_ISE

:OK_ISE
echo ********************************
echo ** Enda yhendus korras.
echo ********************************
:FAILED_ISE
ping 192.168.0.1 -n 1 > c:\temp\nettest.txt
find "TTL=" c:\temp\nettest.txt >NUL
IF NOT ERRORLEVEL 1 goto OK_RUUTER
echo ********************************
echo ** Ruuteriga yhendus puudub.
echo ********************************
goto FAILED_RUUTER

:OK_RUUTER
echo ********************************
echo ** Ruuteriga yhendus korras.
echo ********************************
:FAILED_RUUTER
ping www.ee -n 1 > c:\temp\nettest.txt
find "TTL=" c:\temp\nettest.txt >NUL
IF NOT ERRORLEVEL 1 goto OK_EESTI
echo ********************************
echo ** Eesti yhendus puudub.
echo ********************************
goto FAILED_EESTI


:OK_EESTI
echo ********************************
echo ** Eesti yhendus korras.
echo ********************************
:FAILED_EESTI
:VALISMAA
ping www.google.com -n 1 > c:\temp\nettest.txt
find "TTL=" c:\temp\nettest.txt >NUL
IF NOT ERRORLEVEL 1 goto OK_VALISMAA
echo ********************************
echo ** Valismaa yhendus puudub.
echo ********************************
goto FAILED_VALISMAA


:OK_VALISMAA
echo ********************************
echo ** Valismaa yhendus korras.
echo ********************************
:FAILED_VALISMAA
echo Jatkamiseks vajuta suvalist klahvi!
pause >NUL