add "Wait for network connection" :: important fix
Problem: on the new Win10 ver 10.0.19041.746 on startup the network is not ready for longer time; added the "wait for network connection" functionality to fix this issue
This commit is contained in:
parent
06721a8e42
commit
49fdf1b47e
|
@ -7,7 +7,7 @@ REM -------------------------------------------------------------------
|
||||||
REM
|
REM
|
||||||
REM autoupdate.bat
|
REM autoupdate.bat
|
||||||
REM
|
REM
|
||||||
REM Automatic RDP Wrapper installer and updater // asmtron (12-12-2020)
|
REM Automatic RDP Wrapper installer and updater // asmtron (13-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
|
||||||
|
@ -41,6 +41,7 @@ set rdpwrap_ini="%~dp0rdpwrap.ini"
|
||||||
set rdpwrap_ini_check=%rdpwrap_ini%
|
set rdpwrap_ini_check=%rdpwrap_ini%
|
||||||
set rdpwrap_new_ini="%~dp0rdpwrap_new.ini"
|
set rdpwrap_new_ini="%~dp0rdpwrap_new.ini"
|
||||||
set github_location=1
|
set github_location=1
|
||||||
|
set retry_network_check=0
|
||||||
|
|
||||||
echo ___________________________________________
|
echo ___________________________________________
|
||||||
echo Automatic RDP Wrapper installer and updater
|
echo Automatic RDP Wrapper installer and updater
|
||||||
|
@ -253,6 +254,20 @@ 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
|
||||||
|
ping -n 1 google.com | find "TTL=" >nul
|
||||||
|
if errorlevel 1 (
|
||||||
|
goto waitnetwork
|
||||||
|
) else (
|
||||||
|
goto download
|
||||||
|
)
|
||||||
|
:waitnetwork
|
||||||
|
echo [.] Wait for network connection is available...
|
||||||
|
ping 127.0.0.1 -n 11>nul
|
||||||
|
set /a retry_network_check=retry_network_check+1
|
||||||
|
REM wait for a maximum of 5 minutes
|
||||||
|
if %retry_network_check% LSS 30 goto update
|
||||||
|
:download
|
||||||
set /a github_location=github_location+1
|
set /a github_location=github_location+1
|
||||||
echo.
|
echo.
|
||||||
echo [*] Download latest version of rdpwrap.ini from GitHub...
|
echo [*] Download latest version of rdpwrap.ini from GitHub...
|
||||||
|
|
Loading…
Reference in New Issue