Uninstall ESET security components

Hi.

Please use below procedure to uninstall ESET security components,

Note:
1.Run as system user
2. This scripts will uninstall any version of ESET endpoint security -Edit line number 34 to change uninstall command


import os
temp=os.environ['TEMP']

vbs=r'''
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objDic= CreateObject("Scripting.Dictionary")

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colFeatures = objWMIService.ExecQuery _
    ("Select * from Win32_SoftwareFeature")


Wscript.Echo "Collecting Data......"    

For Each objFeature in colfeatures    
    If (objFeature.ProductName= "ESET Endpoint Security" ) Then
        If Not objDic.Exists(objFeature.IdentifyingNumber) Then
            objDic.Add objFeature.IdentifyingNumber,True
            Wscript.Echo "Product Name: " & objFeature.ProductName    
            Wscript.Echo "Identifying Number: " & objFeature.IdentifyingNumber    
        End If
    End If    
Next



wscript.echo "", vbNewLine
Wscript.Echo "Executing uninstallation process"

For Each id in objDic        
    cmd="msiexec.exe /x " & id & " /q PASSWORD=""xxx*"" /passive /norestart "    
    WScript.Echo cmd
    WshShell.Run cmd,0, True
    WScript.Sleep 10    
Next
'''

with open(temp+r'\uninstall.vbs',"wb") as f :
    f.write(vbs)        

print os.popen('cscript.exe "'+temp+'\uninstall.vbs"').read()

print('Products uninstalled successfully')


if os.path.isfile(temp+r'\uninstall.vbs'):
   os.remove(temp+r'\uninstall.vbs')




20170508-Uninstall-ESET—all-versions.json (2.27 KB)