@echo off&set FileName=%~n0&shift :: ============================================= :: AutoHelp PlugLab Concept: 2006 by Reatogo :: ============================================= :: Help Info: :: ======================= set Routine_Type=1 :: 1=Getting Data 2=Prompts 3=Getting Files 4=Creating Files 5=General set Routine_Vers=1 set Routine_Date=2007-02-15 set RoutineName=InetCheck set RoutineAuthor=Siegfried set Using_work_from= set Example_call_1=%%InetCheck%% set Example_call_2= set Example_call_3= set text_01=Checks if an internet connection exists and prompts the user to go online if required. set text_02=. set text_03=Returns %%result%% "yes" or "no" set text_09=Use InetCheck together with %%AbortConfig%%: set text_10=%%InetCheck%% set text_11=if "%%result%%" == "no" %%AbortConfig%% "No internet connection." set text_12=Or e.g.: set text_13=if "%%result%%" == "no" goto Copy_Local_Files if "%~1" == "GetHelp" goto :EOF echo.&echo %* :: ============================================= set InetConnectMsg=No internet connection detected. ~The next configuration step requires a connection. ~~Please go online before you continue ... :CheckInetConnect echo. set result=yes echo Checking for internet connection ... ping www.google.com -n 1 >nul if errorlevel 1 set Result=no if "%Result%" == "yes" ( echo connection OK set InetConnectMsg= goto :EOF ) %MessageBox% "quest" "Please go online" "%InetConnectMsg%" if "%BTN%" == "next" ( set InetConnectMsg=Still no connection detected. ~~Press OK to retry. Press CANCEL to exit the check loop. goto CheckInetConnect ) else ( echo Aborted without connection ... set result=no set InetConnectMsg= goto :EOF ) goto :EOF :: =============================================