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 modified: 2024-04-16; loaded in 0.0122 seconds