Kaseya Community

SEP 11 Uninstall procedure

This question is answered

I am having a difficult time trying to create an uninstall procedure for SEP 11 in the agent procedures tab. I was wondering if someone can help with this because I am completely lost at this point

Verified Answer
  • cameramonkey’s way might not work (sorry cameramonkey), the reason for this is that the product code “{2EFCC193-D915-4CCB-9201-31773A27BC06}” can change between minor and major versions of most applications. So if you want to do it in a more robust way do this;
    Look for the following registry key;


    HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC



    You might want to look for the key here if you also plan to use your script for 64bit systems


    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Symantec\Symantec Endpoint Protection\SMC


    Now you want to put the registry data value “ProductCode” located under the top registry keys into a variable. Once you have done that you can use it to uninstall SEP 11

    I could give you my script but it is a bit out dated and I have not yet updated it for 64bit machines so I would recommend you give it a go.
    You can use the same process with some other applications too like Adobe Reader and NOD32.

    Good Luck!



    [edited by: HardKnoX at 3:30 PM (GMT -7) on 6-1-2011] Bloody transition between plain and rich text is not working :(
All Replies
  • I have a solution, but it wont let me post it. :(

    to generalize, find the uninstall string in the registry. then run the msiexec against it with the /x and /q switches.

  • I cant upload my procedure for some reason, but we looked for this registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2EFCC193-D915-4CCB-9201-31773A27BC06}

  • Will do. Thanks

  • cameramonkey’s way might not work (sorry cameramonkey), the reason for this is that the product code “{2EFCC193-D915-4CCB-9201-31773A27BC06}” can change between minor and major versions of most applications. So if you want to do it in a more robust way do this;
    Look for the following registry key;


    HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC



    You might want to look for the key here if you also plan to use your script for 64bit systems


    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Symantec\Symantec Endpoint Protection\SMC


    Now you want to put the registry data value “ProductCode” located under the top registry keys into a variable. Once you have done that you can use it to uninstall SEP 11

    I could give you my script but it is a bit out dated and I have not yet updated it for 64bit machines so I would recommend you give it a go.
    You can use the same process with some other applications too like Adobe Reader and NOD32.

    Good Luck!



    [edited by: HardKnoX at 3:30 PM (GMT -7) on 6-1-2011] Bloody transition between plain and rich text is not working :(
  • Symantec Removal.xml

    Try using this copy and paste it then name is as an .xml file and up load it through Agent Procedures. It looks for the SMC ProductCode and then uses it as part of the MSIexe.exe uninstall string. It also removes Symantec LiveUpDate. Please test before using as I'd don't always spell everthing correctly.

    <?xml version="1.0" encoding="utf-8"?>
    <ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">
    <Procedure name="Symantec Removal" treePres="3" id="1253230438" folderId="75246912319812159312521191">
    <Body description="Finds the Product Code for Symantec End Point Protection sets that as a value and then executes the uninstaller as an MSI executable to remove">
    <If description="">
    <Condition name="Windows 32 or 64 Bit Check">
    <Parameter xsi:type="EnumParameter" name="Condition" value="Exists" />
    <Parameter xsi:type="StringParameter" name="Value" value="" />
    </Condition>
    <Then>
    <If description="">
    <Condition name="CheckRegistryValue64">
    <Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Symantec\Symantec Endpoint Protection\SMC" />
    <Parameter xsi:type="EnumParameter" name="Condition" value="Exists" />
    <Parameter xsi:type="StringParameter" name="Value" value="" />
    </Condition>
    <Then>
    <Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false" osType="Windows">
    <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />
    <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC\ProductCode" />
    <Parameter xsi:type="StringParameter" name="VariableName" value="symantec" />
    </Statement>
    <Statement description="Execute the given command as if it were typed in at a command prompt." name="ExecuteShellCommand" continueOnFail="false" osType="Windows">
    <Parameter xsi:type="StringParameter" name="Command" value="&quot;C:\Windows\System32\msiexec.exe /x #symantec# /passive /q&quot;" />
    <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
    <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True" />
    </Statement>
    <Statement description="Execute the given command as if it were typed in at a command prompt." name="ExecuteShellCommand" continueOnFail="false" osType="Windows">
    <Parameter xsi:type="StringParameter" name="Command" value="C:\Program Files (x86)\Symantec\LiveUpdate\LSetup.exe /u" />
    <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
    <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True" />
    </Statement>
    </Then>
    </If>
    </Then>
    <Else>
    <If description="">
    <Condition name="CheckRegistryValue">
    <Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC" />
    <Parameter xsi:type="EnumParameter" name="Condition" value="Exists" />
    <Parameter xsi:type="StringParameter" name="Value" value="" />
    </Condition>
    <Then>
    <Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false" osType="Windows">
    <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />
    <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC\ProductCode" />
    <Parameter xsi:type="StringParameter" name="VariableName" value="symantec" />
    </Statement>
    <Statement description="Execute the given command as if it were typed in at a command prompt." name="ExecuteShellCommand" continueOnFail="false" osType="Windows">
    <Parameter xsi:type="StringParameter" name="Command" value="C:\Windows\System32\msiexec.exe /x #symantec# /passive /q" />
    <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
    <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
    </Statement>
    <Statement description="Execute the given command as if it were typed in at a command prompt." name="ExecuteShellCommand" continueOnFail="false" osType="Windows">
    <Parameter xsi:type="StringParameter" name="Command" value="%ProgramFiles%\Symantec\LiveUpdate\LSetup.exe /u" />
    <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
    <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True" />
    </Statement>
    </Then>
    </If>
    </Else>
    </If>
    </Body>
    </Procedure>
    </ScriptExport>


    [edited by: Ron Lewis at 11:55 AM (GMT -7) on 27 Sep 2012] I've also edited the post so that you should be able to copy and paste the procedure via agent procedures as well.
  • I get the error below when I go to import the XML info into my agent procedure.   Was anyone able to resolve the error?

    ■The text you are trying to import is ot a valid XML or ASP import format.

    ■'C' is an unexpected token. Expecting white space. Line 57, position 77.

  • I've uploaded the .xml file and also updated the document so that it should allow you to import the procedure via the Agent Procedure Import option.

  • Thanks

  • I imported the procedure and have applied it to an agent but nothing seems to work. I need some help.