A handy batch file to check network connectivity.

I wrote this today to provide an easy way for anyone to see if a computer is on the network/internet and even do some basic troubleshooting.

It assumes that you are on a LAN, with a router at 192.168.1.1 If someone wanted to take the time they could probably extract the info from an ipconfig to make it more portable, but like it is, it will work for a lot of folks. Just cut and past into a text file and save with a .bat extension and you should be good to go. Could easily be put on a floppy or e-mailed to someone to test with.

Here is the basic rundown on what it does
[list=1][*]Trys to ping www.google.com with 1 packet, if it succeeds it ends with a success message.[*]If it fails, it will try 3 more packets, if that succeeds, it will finish but warn it detected packet loss.[*]If it still fails, it will try by IP address to test DNS, if this succeeds it will tell you that it had DNS issues.[*]If it still fails it will try to ping 192.168.1.1 and if it succeeds will tell you it can reach the router but not internet.[*]If the ping to 192.168.1.1 fails, it will tell you the network is down.[/list=1]

Yes, I know this is an old thread, but I wonder if someone could help me with this too?
I would like to have a batch file that stays running in the background and notifies with a message everytime there is a lan issue?