<?xml version="1.0" encoding="UTF-8"?>
<!--

    BleachBit
    Copyright (C) 2008-2025 Andrew Ziem
    https://www.bleachbit.org

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    @app Microsoft Windows Defender
    @url https://www.microsoft.com/en-us/safety/pc-security/windows-defender.aspx
    @os Windows
    @cleanerversion v2.0.0
    @cleanerdate 2019-03-18
    @cleanerby MixCool (2009-10-11) & theatre-x (2015-09-11) & Tobias B. Besemer (2019-03-14 - 2019-03-18)
    @tested ok v???, Windows 7
    @testeddate 2019-03-13
    @testedby https://github.com/Tobias-B-Besemer
    @note 

-->
<cleaner id="windows_defender" os="windows">
  <label>Windows Defender</label>
  <description>Anti-virus</description>
  <option id="history">
    <label>History</label>
    <description>Delete the usage history</description>
    <action command="delete" search="walk.files" path="%CommonAppData%\Microsoft\Windows Defender\Scans\History\Results\Quick\"/>
    <action command="delete" search="walk.files" path="%CommonAppData%\Microsoft\Windows Defender\Scans\History\Results\Resource\"/>
    <action command="delete" search="file" path="%CommonAppData%\Microsoft\Windows Defender\Scans\History\Service\History.Log"/>
  </option>
  <option id="temp">
    <label>Temporary files</label>
    <description>Delete the temporary files</description>
    <action command="delete" search="file" path="%WinDir%\Temp\MpCmdRun.log"/>
    <action command="delete" search="file" path="%WinDir%\Temp\MpSigStub.log"/>
    <!-- Definition Update: -->
    <action command="delete" search="file" path="%WinDir%\SoftwareDistribution\Download\Install\mpas-d.exe"/>
    <!-- Definition Update: -->
    <action command="delete" search="file" path="%WinDir%\SoftwareDistribution\Download\Install\mpas-fe.exe"/>
    <!-- Definition Update: -->
    <action command="delete" search="file" path="%WinDir%\SoftwareDistribution\Download\Install\mpas-fe_bd.exe"/>
    <!-- AS Engine: -->
    <action command="delete" search="file" path="%WinDir%\SoftwareDistribution\Download\Install\AS_Engine.exe"/>
    <!-- AS Engine Patch: -->
    <action command="delete" search="glob" path="%WinDir%\SoftwareDistribution\Download\Install\AS_Engine_Patch_*.exe"/>
    <!-- AS Base: -->
    <action command="delete" search="file" path="%WinDir%\SoftwareDistribution\Download\Install\AS_Base.exe"/>
    <!-- AS Base: -->
    <action command="delete" search="glob" path="%WinDir%\SoftwareDistribution\Download\Install\AS_Base_Patch*.exe"/>
    <!-- AntiMaleware Definition Update: -->
    <action command="delete" search="file" path="%WinDir%\SoftwareDistribution\Download\Install\AS_Delta.exe"/>
    <!-- AntiMaleware Definition Update: -->
    <action command="delete" search="glob" path="%WinDir%\SoftwareDistribution\Download\Install\AS_Delta_Patch_*.exe"/>
    <!-- Definition Updates: -->
    <action command="delete" search="walk.files" path="%CommonAppData%\Microsoft\Windows Defender\Definition Updates\Updates\"/>
  </option>
  <option id="quarantine">
    <label>Quarantine</label>
    <description>Delete the files</description>
    <action command="delete" search="walk.files" path="%CommonAppData%\Microsoft\Windows Defender\Quarantine"/>
    <!--
    Includes:
    - Entries
    - ResourceData
    - Resources
    -->
  </option>
  <option id="backup">
    <label>Backup files</label>
    <description>Delete the backup files</description>
    <action command="delete" search="walk.files" path="%CommonAppData%\Microsoft\Windows Defender\Definition Updates\Backup\"/>
  </option>
  <option id="logs">
    <label>Logs</label>
    <description>Delete the logs</description>
    <action command="delete" search="file" path="%CommonAppData%\Microsoft\Windows Defender\Scans\History\Service\Detections.log"/>
    <action command="delete" search="file" path="%CommonAppData%\Microsoft\Windows Defender\Scans\History\Service\History.Log"/>
    <action command="delete" search="file" path="%CommonAppData%\Microsoft\Windows Defender\Scans\History\Service\Unknown.Log"/>
    <action command="delete" search="glob" path="%CommonAppData%\Microsoft\Windows Defender\Support\MPLog-*.log"/>
  </option>
</cleaner>
