Update autoupdate.bat
force uninstall/reinstall of RDP Wrapper on a new version of termsrv.dll
This commit is contained in:
parent
73fba4e6a4
commit
ee21028860
|
@ -7,7 +7,7 @@ REM -------------------------------------------------------------------
|
||||||
REM
|
REM
|
||||||
REM autoupdate.bat
|
REM autoupdate.bat
|
||||||
REM
|
REM
|
||||||
REM Automatic RDP Wrapper installer and updater // asmtron (11-08-2019)
|
REM Automatic RDP Wrapper installer and updater // asmtron (12-08-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
|
||||||
|
@ -89,6 +89,7 @@ echo.
|
||||||
goto :finish
|
goto :finish
|
||||||
|
|
||||||
:start_check
|
:start_check
|
||||||
|
set rdpwrap_installed="0"
|
||||||
REM ----------------------------------
|
REM ----------------------------------
|
||||||
REM 1) check if TermService is running
|
REM 1) check if TermService is running
|
||||||
REM ----------------------------------
|
REM ----------------------------------
|
||||||
|
@ -152,8 +153,9 @@ REM Install RDP Wrapper (exactly uninstall and reinstall)
|
||||||
REM -----------------------------------------------------
|
REM -----------------------------------------------------
|
||||||
:install
|
:install
|
||||||
echo.
|
echo.
|
||||||
echo [~] Install RDP Wrapper ...
|
echo [~] Uninstall and reinstall RDP Wrapper ...
|
||||||
echo.
|
echo.
|
||||||
|
set rdpwrap_installed="1"
|
||||||
%RDPWInst_exe% -u
|
%RDPWInst_exe% -u
|
||||||
%RDPWInst_exe% -i -o
|
%RDPWInst_exe% -i -o
|
||||||
goto :eof
|
goto :eof
|
||||||
|
@ -162,8 +164,15 @@ REM -------------------
|
||||||
REM Restart RDP-Wrapper
|
REM Restart RDP-Wrapper
|
||||||
REM -------------------
|
REM -------------------
|
||||||
:restart
|
:restart
|
||||||
|
if %rdpwrap_installed%=="0" (
|
||||||
|
call :install
|
||||||
|
)
|
||||||
|
if exist %rdpwrap_new_ini% (
|
||||||
|
echo [~] Start copy %rdpwrap_new_ini% to %rdpwrap_ini% ...
|
||||||
|
copy /y %rdpwrap_new_ini% %rdpwrap_ini%
|
||||||
|
)
|
||||||
echo.
|
echo.
|
||||||
echo [~] ReStart RDP Wrapper ...
|
echo [~] Restart RDP Wrapper ...
|
||||||
echo.
|
echo.
|
||||||
%RDPWInst_exe% -r
|
%RDPWInst_exe% -r
|
||||||
goto :eof
|
goto :eof
|
||||||
|
@ -184,8 +193,6 @@ for /f "tokens=* usebackq" %%a in (
|
||||||
if "%download_status%"=="-1" (
|
if "%download_status%"=="-1" (
|
||||||
echo [+] Successfully download from GitHhub latest version to %rdpwrap_new_ini%
|
echo [+] Successfully download from GitHhub latest version to %rdpwrap_new_ini%
|
||||||
set rdpwrap_ini_check=%rdpwrap_new_ini%
|
set rdpwrap_ini_check=%rdpwrap_new_ini%
|
||||||
echo [~] Start copy %rdpwrap_new_ini% to %rdpwrap_ini% ...
|
|
||||||
copy /y %rdpwrap_new_ini% %rdpwrap_ini%
|
|
||||||
call :restart
|
call :restart
|
||||||
) else (
|
) else (
|
||||||
echo [-] FAILED to download from GitHub latest version to %rdpwrap_new_ini%
|
echo [-] FAILED to download from GitHub latest version to %rdpwrap_new_ini%
|
||||||
|
|
Loading…
Reference in New Issue