fix ping for IPv6 (check network connectivity)

This commit is contained in:
asmtron 2021-01-18 20:03:27 +00:00 committed by GitHub
parent 5f4ebaddb6
commit 953699c802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,7 @@ REM -------------------------------------------------------------------
REM REM
REM autoupdate.bat REM autoupdate.bat
REM REM
REM Automatic RDP Wrapper installer and updater // asmtron (13-01-2021) REM Automatic RDP Wrapper installer and updater // asmtron (18-01-2021)
REM ------------------------------------------------------------------- REM -------------------------------------------------------------------
REM Options: REM Options:
REM -log = redirect display output to the file autoupdate.log REM -log = redirect display output to the file autoupdate.log
@ -254,8 +254,9 @@ REM --------------------------------------------------------------------
REM Download up-to-date (alternative) version of rdpwrap.ini from GitHub REM Download up-to-date (alternative) version of rdpwrap.ini from GitHub
REM -------------------------------------------------------------------- REM --------------------------------------------------------------------
:update :update
REM check if network connection is available echo [*] check network connectivity...
ping -n 1 google.com | find "TTL=" >nul :netcheck
ping -n 1 google.com>nul
if errorlevel 1 ( if errorlevel 1 (
goto waitnetwork goto waitnetwork
) else ( ) else (
@ -266,7 +267,7 @@ echo [.] Wait for network connection is available...
ping 127.0.0.1 -n 11>nul ping 127.0.0.1 -n 11>nul
set /a retry_network_check=retry_network_check+1 set /a retry_network_check=retry_network_check+1
REM wait for a maximum of 5 minutes REM wait for a maximum of 5 minutes
if %retry_network_check% LSS 30 goto update if %retry_network_check% LSS 30 goto netcheck
:download :download
set /a github_location=github_location+1 set /a github_location=github_location+1
echo. echo.