batch checks internet connection
Posted: 16 Mar 2011 10:42
hi,
i wrote a batch that runs on windows user logon and pings a website. if ping is succesful, it starts various tools (like mail icq etc). otherwise if i'm offline i don't need those tools running on my notebook.
but now i want to enhance this batch. i know there is a tool called srvany.exe which makes it possible to run a bat(oder exe) file as a service. yet i dont know whats the best way to write a batch which constantly checks if internet-connection is available. or should i keep pinging that website forever? maybe one of you know of another option for me to solve this issue, because i'm still new to batch scripting.
thanks in advance.
i wrote a batch that runs on windows user logon and pings a website. if ping is succesful, it starts various tools (like mail icq etc). otherwise if i'm offline i don't need those tools running on my notebook.
but now i want to enhance this batch. i know there is a tool called srvany.exe which makes it possible to run a bat(oder exe) file as a service. yet i dont know whats the best way to write a batch which constantly checks if internet-connection is available. or should i keep pinging that website forever? maybe one of you know of another option for me to solve this issue, because i'm still new to batch scripting.
thanks in advance.