fix rdpwrap_force_uninstall

This commit is contained in:
asmtron 2022-01-01 14:40:12 +00:00 committed by GitHub
parent 807e30973f
commit 9c8d0f1893
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,7 @@ setlocal EnableDelayedExpansion
:: \_||_|\____|\___\___/ \____| ||_/ \____|\_||_|\___\____(_|____/ \_||_|\___)
:: |_|
::
:: Automatic RDP Wrapper installer and updater asmtron (2021-12-16)
:: Automatic RDP Wrapper installer and updater asmtron (2022-01-01)
:: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:: Options:
:: -log = redirect display output to the file autoupdate.log
@ -150,9 +150,9 @@ reg query "HKLM\SYSTEM\CurrentControlSet\Services\TermService\Parameters" /f "rd
call :install
)
)
:: -------------------------------------
:: -----------------------------------
:: 4) check if rdpwrap.dll file exists
:: -------------------------------------
:: -----------------------------------
if exist %rdpwrap_dll% (
echo [+] Found file: %rdpwrap_dll%
) else (
@ -172,9 +172,9 @@ if exist %rdpwrap_ini% (
call :install
)
)
:: ---------------------------------------------------------------
:: ----------------------------------------------------
:: 6) get file version of %windir%\System32\termsrv.dll
:: ---------------------------------------------------------------
:: ----------------------------------------------------
for /f "tokens=* usebackq" %%a in (
`cscript //nologo "%~f0?.wsf" //job:fileVersion "%windir%\System32\termsrv.dll"`
) do (
@ -237,8 +237,8 @@ goto :finish
echo.
echo [*] Uninstall and reinstall RDP Wrapper...
echo.
if exist %rdpwrap_dll% set rdpwrap_force_uninstall="1"
if exist %rdpwrap_ini% set rdpwrap_force_uninstall="1"
if exist %rdpwrap_dll% set rdpwrap_force_uninstall=1
if exist %rdpwrap_ini% set rdpwrap_force_uninstall=1
if "%rdpwrap_force_uninstall%"=="1" (
echo [*] Set windows registry entry for "rdpwrap.dll" to force uninstall...
reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\TermService\Parameters" /f /v ServiceDll /t REG_EXPAND_SZ /d %rdpwrap_dll%