Uninstall standalone patch management client

Hi,

Please use this script procedure uninstall standalone patch management client remotely,


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

vbs='''
Dim sCmd1
Dim sCmd2
Dim sCmd3
Dim WshShell

On Error Resume Next
sCmd1="wmic product where name=""Comodo One Patch Management Agent"" call uninstall"
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run sCmd1,0, True
WScript.Sleep 10
'''

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

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

print('Comodo One Patch Management Agent successfully uninstalled')

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





20170420-Remove-older-patch-managment.json (1.06 KB)