How to stop Windows Defender from deleting files

File Deletion Defender

Windows Defender has become an excellent antivirus to protect Windows from viruses and threats that run on the Web. This antivirus is now so zealous that it often deletes even harmless files or files that we used until recently, moving them to quarantine and preventing them from being stored. start.

If the file that the antivirus blocks is absolutely safe (better be careful), we can add it to the antivirus extensions or use a little trick to keep it locally or share it in chat or via email without the antivirus “shooting”.

In the following guide we will show you how to prevent Windows Defender from deleting files adding it to the program exceptions or inserting the “offending” file into a compressed file with password. Obviously we advise you to apply the tricks present in this guide only on files that we know are safe: Entering a file virus as an exception could compromise system stability and force us to format the entire operating system.

READ ALSO -> Come si usa l’antivirus Microsoft Defender in Windows 10 e 11

Is the file really safe?

Before adding the file to Windows Defender exceptions or hiding it inside a password-compressed archive it is preferable to have the file analyzed from a site like VirusTotal.

VirusTotal

Before “clearing” the file of the accusations of being a malware, it is therefore always advisable to act with due caution, starting the operating system in safe mode with networking and uploading the suspicious file to the site seen a little while ago.

If most antiviruses report it as “good” (number of detections less than 10), we can proceed with adding to the exceptions or using the trick with compressed files; if, on the other hand, the file is reported as malware by most antivirus, it is better to desist and let the file be deleted.

To learn more we can read our guide on how to check if a file is clean or virus with 30 antivirus together.

Add files to Windows Defender exceptions

Now that we know the file is clean and detected as a false positive we can add it to the exceptions, but only after disabling Windows Defender. At this stage we proceed with the utmost caution, since the antivirus defenses will not be able to block other infections in progress or in download (we close all useless sites and programs that download from the Internet).

To disable Windows Defender we open the Start menu, search and open the app Windows securitywe press on Virus and threat protectionwe select the item Manage settings (under the section Virus and threat protection settings) and, in the new window, we deactivate all the switches present, also confirming the UAC windows that will come out (as an additional security system).

Now that the antivirus is deactivated we scroll on the same page and press on the item Add or remove exceptionspresent under the section Exclusions.

Defender exclusions

In the new screen we press the button Add an exclusionwe select the item File and choose the file or program that we do not want to be deleted by Windows Defender; alternatively we can also add to the exceptions an entire folder, a process active on the PC at that moment or a particular type of file (which should be avoided as much as possible, since all files for Windows can hide viruses).

After adding the exception to Windows Defender, let’s go back to the button screen and we reactivate all Defender modules, so that we can restore maximum security on our computer. From now on, all files added to the section Exceptions they will not be scanned and will not be deleted by mistake from the memory resident module.

How to unlock a quarantined file

If Windows Defender has already locked the file and moved it to quarantine, we can prevent this from happening again and prevent deletion of a false positive by taking us back to the app Windows securityby pressing on Virus and threat protection and clicking this time on the item Protection history.

Defender Timeline

We identify the file blocked by mistake in the history, press it, select the menu below Actions and we choose the voice consented. By doing so, the file will be added to the antivirus exceptions and can be opened without problems.

How to prevent accidental deletion of Defender

If we already know that a file will trigger Windows Defender as soon as it is opened or downloaded, we can prevent this from happening (at least before having disabled the protections as seen above) keeping the file in a compressed archive with password.

This trick is essential if we want to share a file identified as a false positive with friends or colleagues from Defender, since whoever receives the file will hardly remember to disable the protection and add it to the exceptions before even receiving the file.

To hide the false positive file in a compressed archive, deactivate Windows Defender as seen above, download the free program on our computer 7-Zipopen the program interface, go to the path of the file to be saved, select it and press the button at the top add.

7-Zip

In the new window we select as compressed file format Zipinsert the chosen password twice in the fields visible in the section Encryptionwe choose as the cryptographic method AES-256 and press down on OK.

The compressed and password protected file will not be scanned by Windows Defender (and any other antivirus), since the programs do not know the access password. This allows you to share false positives without risking that they are immediately deleted by the antivirus at the time of download.

In fact, to proceed, simply disable the antivirus protection, select the compressed file, enter the unlock password and only now extract the file to the desired location. After the extraction we immediately add the file to the exceptions as seen in the previous chapters of the guide.

To learn more, we can also read our guide on how password protect files and folders on Windows.

Conclusions

Adding exceptions to Windows Defender is never a wise move and should only be done if we are aware of the risk we are taking. We avoid adding too many files to exceptions, especially if we often download suspicious files or false positive files: in most cases if the antivirus clicks and deletes files it will have its good reasons (especially if we often download methods to get free commercial programs).

To learn more we can also read our guides on how to update Microsoft Defender antivirus e how to disable microsoft defender antivirus in windows 10 and 11.

LEAVE A REPLY

Please enter your comment!
Please enter your name here