Ping Connection Test with Sound

Posted: February 8, 2011 in CLI, Linux, Windows

Hello Guys,

I just finished a draft for a Ping Connection Test that emits a sound when its Disconnected, I like this to monitor my internet even if I am not using it, also more actions can be done not just the sound, this is just a start, this is the first draft of the code, I will be posting a step by step details later.

@echo off
set destination=%1
ping %destination% -n 1 |FIND /C “TTL” > c:/temp.log
set /p result=< c:/temp.log
IF %result% EQU 0 (
echo “Connection Inactive”
type beep.txt
ping -w 1000 > NUL
IF %result% EQU 1 (
echo “Connection Active”
ping -w 100000 > NUL

As I said this is just a basic draft later on I will post how to create you own and how to run it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s