Hi
Please use below procedure to uninstall Malwarebytes Managed Client Exploit and MS-Essentials
Note: Run as system user
import os;
import re;
import ctypes
cwd = os.getcwd()
def Uninstall(program):
k=[];
command ='C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe "get-wmiobject Win32_Product | Format-Table Name,IdentifyingNumber" | findstr /i /c:"'+program+'"';
guid=os.popen(command).read();
print(guid)
k.append(re.findall("{.*",guid));
j=[];
for i in k[0]: j.append(i);
print j;
for i in j: os.system('msiexec.exe /x '+i+' /quiet REBOOT=ReallySuppress REMOVE=ALL');
class disable_file_system_redirection:
_disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirection
_revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirection
def __enter__(self):
self.old_value = ctypes.c_long()
self.success = self._disable(ctypes.byref(self.old_value))
def __exit__(self, type, value, traceback):
if self.success:
self._revert(self.old_value)
with disable_file_system_redirection():
if os.path.isfile("C:\Program Files (x86)\Microsoft Security Client\Setup.exe"):
os.chdir("C:\Program Files (x86)\Microsoft Security Client")
out=os.popen("Setup.exe /x /s").read();
print(out);
os.chdir(cwd);
if os.path.isfile("C:\Program Files\Microsoft Security Client\Setup.exe"):
os.chdir("C:\Program Files\Microsoft Security Client")
out=os.popen("Setup.exe /x /s").read();
print(out);
os.chdir(cwd);
if os.path.isfile("C:\Program Files (x86)\Malwarebytes' Anti-Malware\unins000.exe"):
os.chdir("C:\Program Files (x86)\Malwarebytes' Anti-Malware")
out=os.popen("unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART").read();
print(out);
os.chdir(cwd);
if os.path.isfile("C:\Program Files\Malwarebytes' Anti-Malware\unins000.exe"):
os.chdir("C:\Program Files\Malwarebytes' Anti-Malware")
out=os.popen("unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART").read();
print(out);
os.chdir(cwd);
if os.path.isfile("C:\Program Files (x86)\Malwarebytes Anti-Exploit\unins000.exe"):
os.chdir("C:\Program Files (x86)\Malwarebytes Anti-Exploit")
out=os.popen("unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART").read();
print(out);
os.chdir(cwd);
if os.path.isfile("C:\Program Files\Malwarebytes Anti-Exploit\unins000.exe"):
os.chdir("C:\Program Files\Malwarebytes Anti-Exploit")
out=os.popen("unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART").read();
print(out);
os.chdir(cwd);
if os.path.isfile("C:\Program Files (x86)\Malwarebytes Anti-Malware\unins000.exe"):
os.chdir("C:\Program Files (x86)\Malwarebytes Anti-Malware")
out=os.popen("unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART").read();
print(out);
os.chdir(cwd);
if os.path.isfile("C:\Program Files\Malwarebytes Anti-Malware\unins000.exe"):
os.chdir("C:\Program Files\Malwarebytes Anti-Malware")
out=os.popen("unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART").read();
print(out);
os.chdir(cwd);
Uninstall("Malwarebytes' Managed Client");
20170120-Uninstall-Malwarebytes-Managed-Client-Exploit-and-MS-Essentials.json (4.7 KB)