title: shresoft VPN reconnect on internet connection failure
body: <p>I am using a batch file for shrewsoft VPN connect-disconnect, my requirements are 
  1. I am doing a ping test, if ping is failed (internet failure or disconnection issues) then VPN should disconnect and the moment the Internet is ON and ping starts, VPN should connect automatically. So I am looking for an infinite ping loop which will connect or disconnect VPN</p>
  
  <ol start="2">
  <li>I want to run shrew VPN minimsed all the time or better in system tray </li>
  </ol>
  
  <p>I am using this batch but when internet is off (connection failure) VPN disconnects, but I want code to reconnect the VPN once internet connection is reinstated.</p>
  
  <p>@echo off
  start /min "vpn" "C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe" -r "testVPN.vpn" -u username -p password -a
  :loop
      echo testing IP address
      ping 121.244.116.222 >nul || (
         echo ping failure - disconnecting
        taskkill /T /F /IM "ipsecc.exe"</p>
  
  <p>)
  timeout /t 30 /nobreak
  goto :loop</p>