From 1150c1caf35cb5b3263ba5f197df672a431fb817 Mon Sep 17 00:00:00 2001 From: asmtron <49522124+asmtron@users.noreply.github.com> Date: Sat, 7 Sep 2019 17:43:50 +0000 Subject: [PATCH] Update autoupdate.bat code optimization: speedup streaming rdpwrap_new.ini to rdpwrap.ini --- bin/autoupdate.bat | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/autoupdate.bat b/bin/autoupdate.bat index bdf819d..d401bbd 100644 --- a/bin/autoupdate.bat +++ b/bin/autoupdate.bat @@ -7,7 +7,7 @@ REM ------------------------------------------------------------------- REM REM autoupdate.bat REM -REM Automatic RDP Wrapper installer and updater // asmtron (20-08-2019) +REM Automatic RDP Wrapper installer and updater // asmtron (07-09-2019) REM ------------------------------------------------------------------- REM Options: REM -log = redirect display output to the file autoupdate.log @@ -110,9 +110,7 @@ for /f "tokens=1-2* usebackq" %%a in ( ) if %rdp_tcp_session%=="" ( echo [-] Listener session rdp-tcp NOT found^^! - if %rdpwrap_installed%=="0" ( - call :install - ) + call :install ) else ( echo [+] Found listener session: %rdp_tcp_session% ^(ID: %rdp_tcp_session_id%^). ) @@ -224,12 +222,10 @@ if exist %rdpwrap_new_ini% ( for /f "usebackq delims=" %%a in ( `findstr /n "^" %rdpwrap_new_ini%` ) do ( - set "line=!%%a!" - set "line=!line:*:=!" - if "!line!"=="*:=" ( + if "!%%a!"=="" ( echo. ) else ( - echo !line! + echo !%%a! ) ) )>%rdpwrap_ini%