Announcement

Collapse
No announcement yet.

batch script to remove Symantec Corporate 10 antivirus

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • batch script to remove Symantec Corporate 10 antivirus

    Hello,

    I'm trying to remove Symantec Corporate 10 antivirus through the login script. Does my script look correct.

    Thank you in advance.


    ================================================== ==========
    @Echo Off

    Set SAV="C:\Program Files\Symantec AntiVirus"
    If Exist %SAV% Goto Remove
    If Not Exist %SAV% Goto End

    :Remove

    Echo.
    Echo Preparing To Uninstall Symantec Antivirus - Please Do Not Interrupt.

    %systemroot%\system32\msiexec.exe /q /x {33CFCF98-F8D6-4549-B469-6F4295676D83} /FORCERESTART

    :End
    Exit

  • #2
    Re: Do you see anything wrong with this simple script?

    Originally posted by tech_moron View Post
    Hello,

    I'm trying to remove Symantec Corporate 10 antivirus through the login script. Does my script look correct.

    Thank you in advance.


    ================================================== ==========
    @Echo Off

    Set SAV="C:\Program Files\Symantec AntiVirus"
    If Exist %SAV% Goto Remove
    If Not Exist %SAV% Goto End

    :Remove

    Echo.
    Echo Preparing To Uninstall Symantec Antivirus - Please Do Not Interrupt.

    %systemroot%\system32\msiexec.exe /q /x {33CFCF98-F8D6-4549-B469-6F4295676D83} /FORCERESTART

    :End
    Exit
    make it short, like this:

    Code:
    @Echo Off &  Set SAV="C:\Program Files\Symantec AntiVirus"
    If Not Exist %SAV% exit /b
     Echo. &  Echo Preparing To Uninstall Symantec Antivirus - Please Do Not Interrupt. & msiexec /q /x {33CFCF98-F8D6-4549-B469-6F4295676D83} /FORCERESTART

    Comment


    • #3
      Re: Do you see anything wrong with this simple script?

      Also, I usually find that the "proof of the pudding" method gives you an authorative answer.
      Caesar's cipher - 3

      ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

      SFX JNRS FC U6 MNGR

      Comment


      • #4
        Re: Do you see anything wrong with this simple script?

        Yes, it is always recommended to test the script and any script yourself before you use it.

        Actually, your uninstallation script probably won't work because you running it as logonscript and users normally don't have software install and software uninstall priviliges.
        Instead, run it as Startupscript or Shutdownscript to uninstall the software.


        Here's just an other batch sample (startup/shutdown script) you can test,
        Code:
        @echo off
        title  DO NOT CLOSE THIS BOX
        echo DO NOT CLOSE THIS WINDOW
        echo Administrative task in progress.....  please wait!
        echo\
        
        :: software GUID =
        set "SymantecCorporate10Antivirus={33CFCF98-F8D6-4549-B469-6F4295676D83}"
        
        :: if Symantec Corporate 10 Antivirus is installed
        ::   then Uninstall the software
        Set "RegKEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
        
        :: Disable Symantec Require Uninstall Password
        Set "RegKEY2=HKLM\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\Administrator Only\Security"
        
        
        >nul 2>&1 Reg Query "%RegKEY%\%SymantecCorporate10Antivirus%" &&(
        
           >nul 2>&1 Reg Query "%RegKEY2%" /v "LockUnloadServices" &&(
              Reg ADD "%RegKEY2%" /v "LockUnloadServices" /t REG_DWORD /d 0x0 /f)
        
           >nul 2>&1 Reg Query "%RegKEY2%" /v "UseVPUninstallPassword" &&(
              Reg ADD "%RegKEY2%" /v "UseVPUninstallPassword" /t REG_DWORD /d 0x0 /f)
        
           rem NET.exe STOP "Symantec AntiVirus" 
           start ""/wait msiexec.exe /X%SymantecCorporate10Antivirus% /qn REBOOT=ReallySuppress
           ) ||(echo Symantec Corporate 10 Antivirus NOT Installed)
        @tech_moron,
        I've changed the Topic title of this thread to one that better reflects the question's intentions!
        Please take a look at our forum posting rules, thank you.



        \Rems

        --- EDIT --- Concerning disabling 'Symantec Require Uninstall Password':
        besite changing the value of UseVPUninstallPassword => 0
        the batch now also changes the value of LockUnloadServices => 0 , if the key and items exist.
        Last edited by Rems; 14th October 2009, 22:39.

        This posting is provided "AS IS" with no warranties, and confers no rights.

        __________________

        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts

        Comment


        • #5
          Re: batch script to remove Symantec Corporate 10 antivirus

          Thank you! I appreciate everyone's help.

          Can I keep the script in .bat extension in my Group Policy's Startup script?

          Thanks again,

          Comment


          • #6
            Re: batch script to remove Symantec Corporate 10 antivirus

            Originally posted by tech_moron View Post
            Thank you! I appreciate everyone's help.

            Can I keep the script in .bat extension in my Group Policy's Startup script?

            Thanks again,
            Yes you can, Startupscripts and Shutdownscript support the same file-types (vbs, cmd, bat, exe) as logonscripts and logoffscripts do.
            -> for batches you can use the *.cmd or *.bat extension.

            A startup script has "System" privileges on the local computer, but it uses the credentials of the computer object elsewhere in the domain. (both User AND Computer objects are in the group 'Authenticated Users').

            Test the scripts first by running it locally on a test computer where the Symantec sofware is installed, logon as a member of the local group Administrators.


            \Rems

            This posting is provided "AS IS" with no warranties, and confers no rights.

            __________________

            ** Remember to give credit where credit's due **
            and leave Reputation Points for meaningful posts

            Comment


            • #7
              Re: batch script to remove Symantec Corporate 10 antivirus

              hey im new here
              i would love to know if the script work
              way to force removal Symantec Corporate 10 antivirus
              SO THAT I CAN DEPLOY THE NEW SYMANTEC END POINT

              I ALSO NEED HELP CREATING SOME POLICIES IN WATCHGUARD

              Comment

              Working...
              X