Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for checkcon.bat

(view source code of checkcon.bat as plain text)

  1. @ECHO OFF
  2. REM Create temporary batch file
  3. ECHO @ECHO OFF> REPLY.BAT
  4. ECHO SET connect=1>>REPLY.BAT
  5. ECHO Checking connection, please wait...
  6. ECHO @ECHO OFF> CHKCONN.BAT
  7. PING 194.109.6.66 | FIND "Reply from " >>CHKCONN.BAT
  8. REM Set "default" value, which may or may not be altered by CHKCONN.BAT
  9. SET connect=0
  10. CALL CHKCONN.BAT
  11. DEL CHKCONN.BAT
  12. DEL REPLY.BAT
  13. IF "%connect%"=="0" ECHO You have NO active connection to the internet
  14. IF "%connect%"=="1" ECHO You have an active connection to the internet
  15.  

page last uploaded: 2016-12-15, 11:20