Chat > Guides & Projects

Pingtest.bat

(1/1)

Pete:
This one is for when you get someone saying their connection drops for a couple seconds every now and then, where your options are:

1) Sit trying to fix it while it's not broken.
2) Put this on their desktop and get them to run it when they think they've been disco'd.


--- Code: ---echo off
cls
echo hang on a mo...
REM Check localhost
ping localhost -4 -n 1 > c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt

REM Check Default Gateway
ping 192.168.1.253 >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt

REM check File Server
ping 192.168.1.10 -n 1 >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt

REM Check Internet ping
ping 4.2.2.2 -n 1 >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt

REM check dns name resolution
echo NSLOOKUP >> c:\ping\pingtest.txt
nslookup www.tekheads.co.uk >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt

REM print ipconfig
ipconfig /all >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt
echo. >> c:\ping\pingtest.txt

pause

--- End code ---

Simple, but dead handy.

Navigation

[0] Message Index

Go to full version