It would be fairly trivial to write a quick vscript that does precisely this and more. It would take like 5 minutes. Or we could even write even a C# app using the Ping class from the System.Net.NetworkInformation namespace in not much longer (but that can very easily become a significant undertaking as you add features). But why bother when there's already dozens of such things all over the internet available for free such as FREEping and peermonitor (Google will find plenty more). There likely several open source apps to do that too. It's trivial to write, but why reinvent the wheel when there's plenty of existing apps for this? Thank you for your attention CoffeeFiend, This programs is very nice but I had explained very badly, OK I have .bat file witch kills my VPN client and runs again, and I want to execute this .bat file when my internal host, witch I connect to threw VPN is unreachable, I want code witch pings and runs .bat file after it receives 10 "timeouts" or "unreachable" or maybe after 10 - 15 seconds when it realizes that host is unreachable.