Hi C1 team,
I am trying to create a bulk Symantec uninstall script and push it out through a custom python procedure profile.
Is this possible?
Thoughts on the code below?
’ Script START
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = “.”
Set oReg=GetObject(“winmgmts:{impersonationLevel=imper sonate}!” &_
strComputer & “\root\default:StdRegProv”)
strKeyPath = “Symantec\Microsoft\Windows\CurrentVersion\Uninsta ll”
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
Dim path
Dim command
Dim clear
clear=“Symantec\Microsoft\Windows\CurrentVersion\U ninstall”
For Each subkey In arrSubKeys
strKeyPath=strKeyPath + “” + subkey +""
strValueName = “DisplayName”
oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,_
strValueName,strValue
if strvalue=“Symantec Endpoint Protection” then
strValueName = “UninstallString”
oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,_
strValueName,strValue
command=strValue
End if
strKeyPath=clear
Next
command=Replace(command,“MsiExec.exe /I”,“MsiExec.exe /X”)
command=command + " " + “/passive”
Dim WshShell
Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.Run command
’ Script END