Hi Mina,
It looks like you had some trouble deleting DetectionHistory as the history is still there.
To resolve the issue use one of these methods to delete it:
Method 1
First boot into safe mode:
Delete the DetectionHistory folder from:
C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory
Restart your computer.
Note: To see the ProgramData folder and subfolders, make sure you are showing hidden files and folders.
- Windows 10: In File Explorer, select the View tab > check (tick) Hidden items
- Windows 11: In File Explorer, select View > Show > check Hidden items
Method 2
Use the tool I wrote specifically to delete detection history. There's no need to boot to safe mode, just unzip, run and restart.