@echo off if %1. == . goto noparams if %2. == . goto noparams if %2 == 0 goto noparams :start cls echo It is safe to minimize this window at any time. You may close it when you have echo completed your VPN session. echo. echo Next quick-status check in %2 pings against %1. echo. echo. echo. echo -------------------------------------------------------------------------------- ping %1 -n 1 | find "Reply from %1" > nul if errorlevel 1 goto down if errorlevel 0 goto up goto done :down echo ! echo ! echo ! echo ! echo ! echo !!!!!!! echo !!!!! echo !!! echo ! echo. echo. echo \/ VPN Status is DOWN at %date% %time%! \/ echo. echo -------------------------------------------------------------------------------- goto end :up echo ! echo !!! echo !!!!! echo !!!!!!! echo ! echo ! echo ! echo ! echo ! echo. echo. echo /\ VPN Status is UP at %date% %time% /\ echo. echo -------------------------------------------------------------------------------- goto end :end ping %1 -n %2 > nul echo. goto start :noparams echo No params! We need an IP and a duration of when to do the status check, i.e. keepalive 10.1.1.1 60 echo. echo The above command line will ping 10.1.1.1 60 times and refresh the status. pause :done