Fix MBAM uninstall
This commit is contained in:
parent
21e15272e4
commit
2eaf7b0230
1 changed files with 35 additions and 27 deletions
|
|
@ -24,6 +24,7 @@ set iso_date=%_yyyy%-%_mm%-%_dd%
|
||||||
|
|
||||||
rem Get uninstaller path from registry
|
rem Get uninstaller path from registry
|
||||||
set "uninstaller="
|
set "uninstaller="
|
||||||
|
set "altuninstaller=%PROGRAMFILES%\Malwarebytes\Anti-Malware\mbuns.exe"
|
||||||
for /f usebackq^ tokens^=2^ delims^=^" %%s in (
|
for /f usebackq^ tokens^=2^ delims^=^" %%s in (
|
||||||
`reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{35065F43-4BB2-439A-BFF7-0F1014F2E0CD}_is1" /v UninstallString`
|
`reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{35065F43-4BB2-439A-BFF7-0F1014F2E0CD}_is1" /v UninstallString`
|
||||||
) do (
|
) do (
|
||||||
|
|
@ -47,17 +48,24 @@ if exist "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" (
|
||||||
if exist "%uninstaller%" (
|
if exist "%uninstaller%" (
|
||||||
echo "Uninstalling Malwarebytes..."
|
echo "Uninstalling Malwarebytes..."
|
||||||
start "" /wait "%uninstaller%" /VERYSILENT /NORESTART /LOG
|
start "" /wait "%uninstaller%" /VERYSILENT /NORESTART /LOG
|
||||||
) else (
|
goto Done
|
||||||
|
)
|
||||||
|
if exist "%altuninstaller%" (
|
||||||
|
rem MBAM 4.x workaround
|
||||||
|
echo "Uninstalling Malwarebytes..."
|
||||||
|
start "" /wait "%altuninstaller%" /Uninstall /VERYSILENT /NORESTART /LOG
|
||||||
|
goto Done
|
||||||
|
)
|
||||||
color 4e
|
color 4e
|
||||||
echo "Malwarebytes installation not found."
|
echo "Malwarebytes installation not found."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Press any key to exit... "
|
echo "Press any key to exit... "
|
||||||
pause >nul
|
pause >nul
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
:Done
|
||||||
rem Remove marker
|
rem Remove marker
|
||||||
del /f "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker"
|
del /f "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" 2>nul
|
||||||
|
|
||||||
popd
|
popd
|
||||||
endlocal
|
endlocal
|
||||||
Loading…
Reference in a new issue