Hi. I am trying to create a batch file to solve a problem. The problem is that I've got a finicky VPN client at a remote computer which often thinks it is connected even though it is not allowing data to move through the pipe. The only way to restore connectivity is to exit the client and re-open.

So I want the batch file to ping the server, if there's a response then exit. If it times out, check to see if the VPN client process is running and kill it if so, then wait a few seconds for it to terminate. Then open the VPN client (which will auto-connect upon opening). I will schedule this task to run every 30 minutes or so to insure a somewhat persistent connection.

And finally, I'd like the whole thing to run in the background, so I don't get the big black command screen window popping up every time it runs.

Thanks for your ideas!