Här är ett enkelt script för att be användaren kontrollera access till olika punkter i nätet...


@echo off
cls
echo Checking LAN...
set state=OK
ping -n 1 192.168.254.1 | find /i "byte=" > ./tom.txt || set state=dead
echo GW status is: %state%

set state=OK
ping -n 1 192.168.254.50 | find /i "byte=" >> ./tom.txt || set state=dead
echo server status is: %state%

echo Checking WAN...
set state=OK
ping -n 1 81.216.133.1 | find /i "byte=" >> ./tom.txt || set state=dead
echo WAN Gateway status is: %state%

set state=OK
ping -n 1 www.dn.se | find /i "byte=" >> ./tom.txt || set state=dead
echo dn.se status is: %state%

set state=OK
ping -n 1 www.att.com | find /i "byte=" >> ./tom.txt || set state=dead
echo att.com status is: %state%

echo
.
del "./tom.txt"

pause