Reply
Contributor
TalktoJimmy
Posts: 7
0

Re: One2Many Script Repository

REM -===- Remove Sophos Only -===-

@ECHO

OFF
ECHO ====================================================================
ECHO Sophos Anti-Virus Removal Script
ECHO.
ECHO NOTE: Dont blame me if you cant read the directions.
Echo.
ECHO Press any key to continue, or press Ctrl-C to Cancel.
ECHO ====================================================================
ECHO.
Pause.
CLS

ver|find "Windows XP" > NUL
if errorlevel 1 goto 2K
ECHO Windows XP Detected.
TASKKILL /F /IM "Almon.exe" >NUL 2>NUL
REM === Checks to ensure EM Lib, Console or PM are not installed ===
if exist "%PROGRAMFILES%\sophos\enterprise console\cac.pem" GOTO ERR
if exist "%PROGRAMFILES%\sophos\enterprise manager\library\cac.pem" GOTO ERR
if exist "%PROGRAMFILES%\Sophos\PureMessage\bin\puremessage.msc" (GOTO ERR) ELSE (GOTO PASS)

:2K
ver|find "Windows 2000" >NUL
if errorlevel 1 goto 2k3
ECHO Windows 2000 Detected.
REM === Checks to ensure EM Lib, Console or PM are not installed ===
if exist "%PROGRAMFILES%\sophos\enterprise console\cac.pem" GOTO ERR
if exist "%PROGRAMFILES%\sophos\enterprise manager\library\cac.pem" GOTO ERR
if exist "%PROGRAMFILES%\Sophos\PureMessage\bin\puremessage.msc" (GOTO ERR) ELSE (GOTO PASS)

:2K3
ver|find "Version 5.2" >NUL
if errorlevel 1 goto ERR
ECHO Windows 2003 Detected.
TASKKILL /F /IM "Almon.exe" >NUL 2>NUL
REM === Checks to ensure EM Lib, Console or PM are not installed ===
if exist "%PROGRAMFILES%\sophos\enterprise console\cac.pem" GOTO ERR
if exist "%PROGRAMFILES%\sophos\enterprise manager\library\cac.pem" GOTO ERR
if exist "%PROGRAMFILES%\Sophos\PureMessage\bin\puremessage.msc" (GOTO ERR) ELSE (GOTO PASS)

:PASS

ECHO.
ECHO Performing regular MSI based removal...
MSIEXEC /X {15C418EB-7675-42be-B2B3-281952DA014D} /qn /l*v c:\sau2_unist.txt 2> NUL
MSIEXEC /X {C12953C2-4F15-4A6C-91BC-511B96AE2775} /qn /l*v c:\sau_unist.txt 2> NUL
MSIEXEC /X {09C6BF52-6DBA-4A97-9939-B6C24E4738BF} REBOOT=SUPPRESS /qn /l*v c:\sav_unist.txt 2> NUL
MSIEXEC /X {FF11005D-CBC8-45D5-A288-25C7BB304121} /qn /l*v c:\rms_unist.txt 2> NUL
ECHO Completed.

ECHO.
ECHO Performing MSI Cleanup (if available)...
"%PROGRAMFILES%\Windows Installer Clean Up\MSIZAP.EXE" tw {15C418EB-7675-42be-B2B3-281952DA014D} > C:\sop_msiclnup.txt
ECHO -===- END OF SAU2 -===- >> C:\sop_msiclnup.txt

"%PROGRAMFILES%\Windows Installer Clean Up\MSIZAP.EXE" tw {09C6BF52-6DBA-4A97-9939-B6C24E4738BF} >> C:\sop_msiclnup.txt
ECHO -===- END OF SAV -===- >> C:\sop_msiclnup.txt

"%PROGRAMFILES%\Windows Installer Clean Up\MSIZAP.EXE" tw {C12953C2-4F15-4A6C-91BC-511B96AE2775} >> C:\sop_msiclnup.txt
ECHO -===- END OF SAU -===- >> C:\sop_msiclnup.txt

"%PROGRAMFILES%\Windows Installer Clean Up\MSIZAP.EXE" tw {FF11005D-CBC8-45D5-A288-25C7BB304121} >> C:\sop_msiclnup.txt
ECHO -===- END OF RMS -===- >> C:\sop_msiclnup.txt
Echo Completed.

ECHO.
ECHO Constructing Registry Keys for removal...
ECHO Completed.

ECHO REGEDIT4 > %TEMP%\SOTMP.REG
ECHO. >> %TEMP%\SOTMP.REG

REM ====** Registry Keys marked for Removal **=====================================================================

REM === MSI Installer GUIDs ===
ECHO [-HKEY_CLASSES_ROOT\Installer\Products\25FB6C90ABD679A499936B2CE47483FB] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_CLASSES_ROOT\Installer\Products\BE814C515767eb242B3B829125AD10D4] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_CLASSES_ROOT\Installer\Products\2C35921C51F4C6A419CB15B169EA7257] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_CLASSES_ROOT\Installer\Products\D50011FF8CBC5D542A88527CBB031412] >> %TEMP%\SOTMP.REG

ECHO [-HKEY_CLASSES_ROOT\Installer\Features\25FB6C90ABD679A499936B2CE47483FB] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_CLASSES_ROOT\Installer\Features\BE814C515767eb242B3B829125AD10D4] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_CLASSES_ROOT\Installer\Features\2C35921C51F4C6A419CB15B169EA7257] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_CLASSES_ROOT\Installer\Features\D50011FF8CBC5D542A88527CBB031412] >> %TEMP%\SOTMP.REG

ECHO [-HKEY_CLASSES_ROOT\Installer\UpgradeCodes\E932B7952303A1943A2218777329E5A8] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_CLASSES_ROOT\Installer\UpgradeCodes\0D6888B32A8929940ACA98A3DEBB94B4] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_CLASSES_ROOT\Installer\UpgradeCodes\A2ECF5789F971654CBB5476964870E94] >> %TEMP%\SOTMP.REG

ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\25FB6C90ABD679A499936B2CE47483FB] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\BE814C515767eb242B3B829125AD10D4] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\2C35921C51F4C6A419CB15B169EA7257] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\D50011FF8CBC5D542A88527CBB031412] >> %TEMP%\SOTMP.REG

ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\25FB6C90ABD679A499936B2CE47483FB] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\BE814C515767eb242B3B829125AD10D4] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\2C35921C51F4C6A419CB15B169EA7257] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\D50011FF8CBC5D542A88527CBB031412] >> %TEMP%\SOTMP.REG

ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\UpgradeCodes\E932B7952303A1943A2218777329E5A8] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\UpgradeCodes\0D6888B32A8929940ACA98A3DEBB94B4] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\UpgradeCodes\A2ECF5789F971654CBB5476964870E94] >> %TEMP%\SOTMP.REG

ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\E932B7952303A1943A2218777329E5A8] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\0D6888B32A8929940ACA98A3DEBB94B4] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\A2ECF5789F971654CBB5476964870E94] >> %TEMP%\SOTMP.REG

ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\25FB6C90ABD679A499936B2CE47483FB] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\BE814C515767eb242B3B829125AD10D4] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\2C35921C51F4C6A419CB15B169EA7257] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\D50011FF8CBC5D542A88527CBB031412] >> %TEMP%\SOTMP.REG

REM === Sophos Application Settings ===
ECHO [-HKEY_CURRENT_USER\Software\Sophos] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\Software\Sophos] >> %TEMP%\SOTMP.REG

REM === Sophos Uninstall Keys ===
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{09C6BF52-6DBA-4A97-9939-B6C24E4738BF}] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{15C418EB-7675-42be-B2B3-281952DA014D}] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C12953C2-4F15-4A6C-91BC-511B96AE2775}] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF11005D-CBC8-45D5-A288-25C7BB304121}] >> %TEMP%\SOTMP.REG

REM === Sophos Legacy Services Set01 ===
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\LEGACY_SAVADMINSERVICE] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\LEGACY_SAVONACCESS_CONTROL] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\LEGACY_SAVONACCESS_FILTER] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\LEGACY_SAVSERVICE] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\LEGACY_SOPHOS_AGENT] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\LEGACY_SOPHOS_AUTOUPDATE_AGENT] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\LEGACY_SOPHOS_AUTOUPDATE_SERVICE] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\LEGACY_SOPHOS_MESSAGE_ROUTER] >> %TEMP%\SOTMP.REG

REM === Sophos Event Log Registration Set01 ===
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\SophosAntiVirus] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\System\SAVOnAccess Control] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\System\SAVOnAccess Filter] >> %TEMP%\SOTMP.REG

REM === Sophos Services Set01 ===
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SAVAdminService] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SAVOnAccess Control] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SAVOnAccess Filter] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SAVService] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Sophos Agent] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Sophos AutoUpdate Agent] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Sophos AutoUpdate Service] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Sophos Message Router] >> %TEMP%\SOTMP.REG

REM === Sophos Legacy Services Current===
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SAVADMINSERVICE] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SAVONACCESS_CONTROL] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SAVONACCESS_FILTER] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SOPHOS_AGENT] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SAVSERVICE] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SOPHOS_AUTOUPDATE_AGENT] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SOPHOS_AUTOUPDATE_SERVICE] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_SOPHOS_MESSAGE_ROUTER] >> %TEMP%\SOTMP.REG

REM === Sophos Event Log Registration Current ===
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\SophosAntiVirus] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\System\SAVOnAccess Control] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\System\SAVOnAccess Filter] >> %TEMP%\SOTMP.REG

REM === Sophos Services Current ===
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAVAdminService] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAVOnAccess Control] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAVOnAccess Filter] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAVService] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos Agent] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos AutoUpdate Agent] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos AutoUpdate Service] >> %TEMP%\SOTMP.REG
ECHO [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sophos Message Router] >> %TEMP%\SOTMP.REG

REM ==============================================================================================================

ECHO.
ECHO Stopping Sophos Anti-Virus Services...
net stop "Sophos Agent" 2> NUL
net stop "Sophos Anti-Virus" 2> NUL
net stop "Sophos Anti-Virus status reporter" 2> NUL
net stop "Sophos AutoUpdate Service" 2> NUL
net stop "Sophos Message Router" 2> NUL
ECHO Completed.

GOTO SERXP

:RESUME
ECHO.
ECHO Unregistering DLLs...

REM === Sophos Anti-Virus DLLs ===
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\backgroundscanning.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\componentmanager.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\configuration.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\desktopmessaging.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\driveprocessor.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\eeconsumer.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\filterprocessors.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\fsdecomposer.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\icadapter.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\icmanagement.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\icprocessors.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\legacyconsumers.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\localisation.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\logging.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\persistance.dll" 
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\SAVI0.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\SAVMSCM.DLL"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\savshellext.dll" 
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\scaneditexports.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\scaneditfacade.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\scanmanagement.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\security.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\sophtaineradapter.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\systeminformation.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\threatdetection.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\threatmanagement.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\translators.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\Sophos Anti-Virus\virusdetection.dll"

REM === Sophos AutoUpdate DLLs ===
regsvr32 /u /s "%PROGRAMFILES%\Sophos\AutoUpdate\cidsync.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\AutoUpdate\config.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\AutoUpdate\inetconn.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\AutoUpdate\InstlMgr.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\AutoUpdate\ispsheet.dll"
regsvr32 /u /s "%PROGRAMFILES%\Sophos\AutoUpdate\logger.dll"
ECHO Completed.

ECHO.
ECHO Removing the Sophos Installation Files...

REM === Emtpies the temporary files folders, folders are recreated if they are empty ===
RD /s  /Q %TEMP% 2> NUL
MD %TEMP% 2> NUL
RD /s  /Q %WINDIR%\TEMP\ 2> NUL
MD %WINDIR%\Temp 2> NUL

REM === Remove Sophos created folders and files ===
RD /S /Q "%PROGRAMFILES%\SOPHOS\AutoUpdate" 2> NUL
RD /S /Q "%PROGRAMFILES%\SOPHOS\Sophos Anti-Virus" 2> NUL
RD /S /Q "%PROGRAMFILES%\SOPHOS\Remote Management System" 2> NUL
RD /S /Q "%PROGRAMFILES%\SOPHOS\" 2> NUL
RD /S /Q "C:\SAVXPSA" 2> NUL
RD /s /Q "%ALLUSERSPROFILE%\Start Menu\Programs\Sophos" 2> NUL
RD /S /Q "%ALLUSERSPROFILE%\Application Data\Sophos" 2> NUL
RD /S /Q "%USERPROFILE%\Application Data\Sophos" 2> NUL
DEL /Q   "%ALLUSERSPROFILE%\Start Menu\Programs\Startup\AutoUpdate Monitor.lnk" 2> NUL
RD /S /Q "%WINDIR%\Installer\{09C6BF52-6DBA-4A97-9939-B6C24E4738BF}" 2> NUL
RD /S /Q "%WINDIR%\Installer\{15C418EB-7675-42be-B2B3-281952DA014D}" 2> NUL
RD /S /Q "%WINDIR%\Installer\{C12953C2-4F15-4A6C-91BC-511B96AE2775}" 2> NUL
RD /S /Q "%WINDIR%\Installer\{FF11005D-CBC8-45D5-A288-25C7BB304121}" 2> NUL
DEL /Q   "%WINDIR%\System32\Drivers\savonaccesscontrol.sys" 2> NUL
DEL /Q   "%WINDIR%\System32\Drivers\savonaccessfilter.sys" 2> NUL
ECHO Completed.

REM === Remove the typical Sophos account/groups for Sophos AutoUpdate ===
ECHO.
ECHO Deleting Sophos Accounts and Sophos Groups...
Net user SophosSAU%COMPUTERNAME%0 /DELETE 2> NUL
Net user SophosSAU%COMPUTERNAME%1 /DELETE 2> NUL
Net user SophosSAU%COMPUTERNAME%2 /DELETE 2> NUL
Net user SophosSAU%COMPUTERNAME%3 /DELETE 2> NUL

Net localgroup SophosAdministrator /DELETE 2> NUL
Net localgroup SophosOnAccess /DELETE 2> NUL
Net localgroup SophosPowerUser /DELETE 2> NUL
Net localgroup SophosUser /DELETE 2> NUL
ECHO Completed.

GOTO END

:SERXP
ver|find "Windows XP" > NUL
if errorlevel 1 goto SER2K3
ECHO.
ECHO (XP) Deleting Sophos Services...
sc delete SAVService > NUL
sc delete SAVAdminService > NUL
sc delete "Sophos Agent" > NUL
sc delete "Sophos AutoUpdate Agent" > NUL
sc delete "Sophos AutoUpdate Service" > NUL
sc delete "Sophos Message Router" > NUL
ECHO Completed.
ECHO.
ECHO Removing the Sophos Registry Keys...
SC create SopReg binpath= "cmd /K START /WAIT REGEDIT /S %TEMP%\SOTMP.REG" type= own type= interact
sc start "SopReg" > NUL
sc delete "SopReg"
ECHO Completed.
GOTO RESUME

:SER2K3
ver|find "Version 5.2" >NUL
if errorlevel 1 goto SER2K
ECHO.
ECHO (2K3) Deleting Sophos Services...
sc delete SAVService > NUL
sc delete SAVAdminService > NUL
sc delete "Sophos Agent" > NUL
sc delete "Sophos AutoUpdate Agent" > NUL
sc delete "Sophos AutoUpdate Service" > NUL
sc delete "Sophos Message Router" > NUL
ECHO Completed.
ECHO.
ECHO Removing the Sophos Registry Keys...
SC create SopReg binpath= "cmd /K START /WAIT REGEDIT /S %TEMP%\SOTMP.REG" type= own type= interact
sc start "SopReg" > NUL
sc delete "SopReg"
ECHO Completed.
GOTO RESUME

:SER2K
ver|find "Windows 2000" >NUL
if errorlevel 1 goto END
ECHO.
ECHO Removing the Sophos Registry Keys...
REGEDIT /S %TEMP%\SOTMP.REG
ECHO Completed.
GOTO RESUME

:END
ECHO.
ECHO ====================================================
ECHO Please reboot the computer and run this script again
ECHO         If you have not already done so.
ECHO ====================================================
Echo.
Pause
EXIT

:ERR
ECHO.
ECHO ==============================================================
ECHO Script has terminated because either your O.S is Windows 9x/NT
ECHO OR Puremessage/Enterprise Console/EM Library was found.
ECHO ==============================================================
Pause
EXIT

Contributor
TalktoJimmy
Posts: 7
0

Re: One2Many Script Repository

This is just a script I run for my users who complain alot about the computer[s] running slow. The script just reboots the computer.

 

REM -===- VERSION 1.01 -===-

@ECHO

OFF
ECHO ====================================================================
ECHO FixMost of IT
ECHO.
ECHO Please note this script should fix most of your problems
Echo.
ECHO Press any key to continue, or press Ctrl-C to Cancel.
ECHO ====================================================================
ECHO.
Pause.
CLS

ver|find "Windows XP" > NUL
if errorlevel 1 goto 2K
ECHO Windows XP Detected.
shutdown /r
goto END

:2K
ver|find "Windows 2000" >NUL
if errorlevel 1 goto 2k3
ECHO Windows 2000 Detected.
shutdown /r
goto END

:2K3
ver|find "Version 5.2" >NUL
if errorlevel 1 goto Win7
ECHO Windows 2003 Detected.
shutdown /r

:Win7
ver|find "Version 6.1" >NUL
if errorlevel 1 goto ERR
ECHO Windows 7 Detected.
shutdown /r
goto END

:END
ECHO.
ECHO ====================================================
ECHO  Your computer will run great after this reboot
ECHO         Computer will now reboot
ECHO               JIMMY IS A GENIUS
ECHO ====================================================
Echo.
Pause
EXIT

Contributor
TalktoJimmy
Posts: 7
0

Re: One2Many Script Repository

What weekly scripts are you guys running for workstation maintenance? Server ?

 

 

New Contributor
RED21
Posts: 2
0

Re: One2Many Script Repository

I know this sounds a bit too simple, but sometimes you just need to make a change and get the settings updated right away.

 

GPUPDATE /FORCE

 

I just took over a small SBS network, and all the WSU ( Windows Update ) settings were all over the place.

Repaired the issue on the server then pushed out the GPUPDATE /FORCE, then another task for a reboot.

 

Job done, Windows updates set back the way I wanted, across the whole network in 1 fell swoop.

 

One2Many how I love thee ...

New Contributor
SardinasA
Posts: 1
0

Re: One2Many Script Repository

Here is another one for you, This regedit below allows logmein to run in safemode when a user restarts and boots into safemode manually

 It was a life saver for me

 

reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SafeBoot\Network\LogMeIn" /VE /T REG_SZ /D "Service"

New Contributor
skrandalis
Posts: 3
0

Re: One2Many Script Repository

I am sure everyone knows how sometimes when you try to access a users computer via logmein it ask for an access code, but other times you have to enter a username and password. This script will add the logmeinremoteuser account which is hidden and allows you to remote in using an access code. Just replace password with the password you desire in the script below. If you forget to change the password in the script the password will be password. Does not work on Server OS's.

(note: REG.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentV.... is all on one line.)

 

@echo off

Rem Creates Logmein User for access code use

Net user LogMeInRemoteUser password /add goto admin

:admin @echo off net localgroup administrators LogMeInRemoteUser /add

net localgroup users LogMeInRemoteUser /delete

REG.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v LogMeInRemoteUser /t REG_DWORD /d 0 /f

New Contributor
skrandalis
Posts: 3
0

Re: One2Many Script Repository

[ Edited ]

CORRECTION, Word wrap is killing my script.

 

I am sure everyone knows how sometimes when you try to access a users computer via logmein it ask for an access code, but other times you have to enter a username and password. This script will add the logmeinremoteuser account which is hidden and allows you to remote in using an access code. Just replace password with the password you desire in the script below. If you forget to change the password in the script the password will be password. Does not work on Server OS's.

(note: REG.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentV......_DWORD /d 0 /f is all on one line 'the last line')

 

@echo off

Rem Creates Logmein User for access code use

Net user LogMeInRemoteUser password /add

goto admin

:admin @echo off net localgroup administrators LogMeInRemoteUser /add

net localgroup users LogMeInRemoteUser /delete

REG.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v LogMeInRemoteUser /t REG_DWORD /d 0 /f

New Contributor
j_helland
Posts: 2
0

Re: One2Many Script Repository

I work at a company in which 500+ employees work remotely. Often we have software outages that are planned and we like to communicate to all employees that these outages are going to happen in XX amount of minutes. I use the DOS command 'msg' to accomplish this. This can be pasted directly into the "run a remote command" task dialogue box.

 

msg * /time:999  **ATTENTION**SOFTWARE OUTAGE IN 20 MINUTES**   **The software system will be unavailable as of 7:15am CST. The expected outage time is 20 minutes.**

 


This message will pop into the forefront of the end user's display even if the system is at the login prompt. I find this very useful because One2Many will ignore any systems that are offline, thus only the online users will receive the message and because it appears on top of all other windows, it is more effective than email communication.

 

Note: The /time:999 switch will force the window to stick for 999 seconds. It seems that entering any value over 999 will force the default value and the message disappears after 15 seconds or so. I use this timer in case someone is away from their computer at the time I send the messages.

New Contributor
apgarza
Posts: 3
0

Re: One2Many Script Repository

I can't get a cleantemp.vbs file to work. It says it runs successfully but it actually doesn't do anything. Unless I run it myself on windows. Which then it prompts me to "OPEN" the file.

New Contributor
apgarza
Posts: 3
0

Re: One2Many Script Repository

Did you ever get a reply to this? I still haven't gotten any reply's and haven't gotten any actual good info from the LOGMEIN Support staff. :(

 

I spent about 6 hours so far trying to figure out how to get a script to run with elevated permissions and I know all the supposed tricks with task scheduler and so forth, but none of them are a good option for me. There are other third party programs which can run these kind's of files automatically for us but I am really trying to use LogmeIn One2Many.