Update autoupdate.bat
code optimization: speedup streaming rdpwrap_new.ini to rdpwrap.ini
This commit is contained in:
parent
b8cba61e06
commit
1150c1caf3
|
@ -7,7 +7,7 @@ REM -------------------------------------------------------------------
|
||||||
REM
|
REM
|
||||||
REM autoupdate.bat
|
REM autoupdate.bat
|
||||||
REM
|
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 -------------------------------------------------------------------
|
||||||
REM Options:
|
REM Options:
|
||||||
REM -log = redirect display output to the file autoupdate.log
|
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%=="" (
|
if %rdp_tcp_session%=="" (
|
||||||
echo [-] Listener session rdp-tcp NOT found^^!
|
echo [-] Listener session rdp-tcp NOT found^^!
|
||||||
if %rdpwrap_installed%=="0" (
|
call :install
|
||||||
call :install
|
|
||||||
)
|
|
||||||
) else (
|
) else (
|
||||||
echo [+] Found listener session: %rdp_tcp_session% ^(ID: %rdp_tcp_session_id%^).
|
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 (
|
for /f "usebackq delims=" %%a in (
|
||||||
`findstr /n "^" %rdpwrap_new_ini%`
|
`findstr /n "^" %rdpwrap_new_ini%`
|
||||||
) do (
|
) do (
|
||||||
set "line=!%%a!"
|
if "!%%a!"=="" (
|
||||||
set "line=!line:*:=!"
|
|
||||||
if "!line!"=="*:=" (
|
|
||||||
echo.
|
echo.
|
||||||
) else (
|
) else (
|
||||||
echo !line!
|
echo !%%a!
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)>%rdpwrap_ini%
|
)>%rdpwrap_ini%
|
||||||
|
|
Loading…
Reference in New Issue