+ Post New Thread
Results 1 to 7 of 7
Scripts Thread, Sophos removal script in Coding and Web Development; So I am currently faced with replacing the AV software on 300 machines in our school, switching from Sophos to ...
  1. #1

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Bristol
    Posts
    12,329
    Blog Entries
    24
    Thank Post
    425
    Thanked 1,372 Times in 1,090 Posts
    Rep Power
    397

    Sophos removal script

    So I am currently faced with replacing the AV software on 300 machines in our school, switching from Sophos to CA eTrust Antivirus.

    Rather than having to click dozens of things on every machine, I have rustled up this nice simple script which
    1. removes executables
    2. removes registry items
    3. removes left over folders
    4. updates the group policy (ie. to remove windows firewall rules for Sophos, and add new ones for eTrust)
    5. reboots the computer

    All it requires is a Windows XP machine and a copy of PSExec. To run it, stick it in a .cmd file and from a command prompt, enter the cmd file followed by the name of the computer to remove Sophos from.
    eg.
    Code:
    removesophos.cmd \\Computer
    Code:
    @echo off
    echo "Starting Removal of Sophos"
    
    psexec %1 msiexec.exe /x "c:\program files\sophos\autoupdate\cache\savxp\sophos anti-virus.msi" /q /norestart
    psexec %1 msiexec.exe /x "c:\program files\sophos\autoupdate\cache\rms\sophos remote management system.msi" /q /norestart
    psexec %1 msiexec.exe /x "c:\program files\sophos\autoupdate\cache\sau\sophos autoupdate.msi" /q /norestart
    
    echo "MSI's removed"
    
    psexec %1 reg delete HKLM\Software\Sophos /f
    psexec %1 reg delete HKCU\Software\Sophos /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\Sophos Agent" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\SavService" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\SAVAdminService" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\Sophos AutoUpdate Agent" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\Sophos AutoUpdate Service" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\Sophos Certification Manager" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\Sophos EMLib Update Agent" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\SEMscheduler" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\Sophos Management Service" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\Sophos Message Router" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\SQLAgent$SOPHOS" /f
    psexec %1 reg delete "HKLM\SYSTEM\CurrentControlSet\Services\MSSQL$SOPHOS" /f
    psexec %1 reg delete "HKLM\System\CurrentControlSet\Services\Eventlog\Sophos" /f
    
    echo "Registry cleaned up"
    
    psexec %1 rmdir "c:\program files\sophos" /s /q
    
    echo "Sophos folder removed"
    
    psexec %1 "c:\windows\system32\gpupdate" /force /boot
    
    echo "Group Policy updated"
    echo "Rebooting"
    If anyone can recommend any changes, or if I alter it in any way, give me a shout. Also, obviously, this could be automated with a batch of machines using a second batch file which calls this one repeatedly.

  2. #2
    ICT_GUY's Avatar
    Join Date
    Feb 2007
    Location
    Weymouth
    Posts
    2,217
    Thank Post
    592
    Thanked 278 Times in 199 Posts
    Rep Power
    98
    Uninstalling Sophos

    On that thread is the sophos own brand uninstal script. It might be of use to check against.

  3. #3

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Bristol
    Posts
    12,329
    Blog Entries
    24
    Thank Post
    425
    Thanked 1,372 Times in 1,090 Posts
    Rep Power
    397
    Quote Originally Posted by ICT_GUY View Post
    Uninstalling Sophos

    On that thread is the sophos own brand uninstal script. It might be of use to check against.
    Yeah I used that thread a bit already. Much of it is aimed at running a script on a local machine, or removing the server software, and also refers to older versions of the software (we're now on v7.6.3). My script is an attempt to simplify it all and make it a 'click click done' process.

    Cheers though.

  4. #4
    Galway's Avatar
    Join Date
    Jun 2007
    Location
    West Yorkshire
    Posts
    671
    Thank Post
    5
    Thanked 89 Times in 78 Posts
    Rep Power
    21
    Why are you downgrading your AV ?

  5. #5

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Bristol
    Posts
    12,329
    Blog Entries
    24
    Thank Post
    425
    Thanked 1,372 Times in 1,090 Posts
    Rep Power
    397
    Quote Originally Posted by Galway View Post
    Why are you downgrading your AV ?
    Because CA AV is provided for free by our LEA, and Sophos would require us to buy licenses ourselves.

  6. #6

    Join Date
    Jan 2009
    Location
    Aberdeenshire
    Posts
    5
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Etrust Installation on CC3

    At Aberdeenshire LEA we are currently removing Sophos from all our CC3 networks and Install CA Etrust Threat Manager.

    We can successfully remove Sophos by running their removal scripts as 2 packages.

    When we insatll our Etrust package it breaks the application installation/removal system.

    Appagent will not run and no packages can be added or removed from the computers.

    If you run Appagent manualy via an "installrm" command or Restart the "Autoexnt" service them computer comes good.

    The same happens if you disable the anti-virus and reboot.

    Sometimes they come good eventullay themselves!

    How have you pushed out etrust to the stations and have you encountered these problems?

    I think it might be useful to speak about things?

  7. #7

    john's Avatar
    Join Date
    Sep 2005
    Location
    Yorkshire
    Posts
    9,092
    Thank Post
    960
    Thanked 719 Times in 639 Posts
    Rep Power
    195
    @paul have you got the Sophos scripts you mention that you could post them on here please?

SHARE:
+ Post New Thread

Similar Threads

  1. [MS Office - 2007] MSOCache Removal
    By Mr.Ben in forum Office Software
    Replies: 4
    Last Post: 12th June 2009, 09:17 AM
  2. Notification of ps/2 removal
    By fafster in forum Hardware
    Replies: 7
    Last Post: 24th September 2008, 01:58 PM
  3. [MS Office - 2007] Office 2007 Removal
    By danIT in forum Office Software
    Replies: 3
    Last Post: 13th May 2008, 03:01 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •