Manually exclude drive letter in windows defender

5,066

Here is another option. Make a batch file like this:

REG ADD "HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths" /v "F:\\\" /t REG_DWORD /d 0 /f

Configure a basic task in Task Scheduler and set the .bat file to run as SYSTEM with highest privileges.

This adds F:\ drive to the exclusions list.

This can be verified using the Registry Editor. Once done, the added task can be deleted.

Or create a REG file as in add windows defender service exception for internet radio ... and run it using scheduler (regedit.exe /s filename.reg) or (reg.exe import filename.reg).

Share:
5,066

Related videos on Youtube

Arete
Author by

Arete

Updated on September 18, 2022

Comments

  • Arete
    Arete over 1 year

    Is there a way to manually exclude a drive from Windows Defender in Windows 10? I know how to do it with the control panel. But the problem is that this requires the drive to be plugged in, but if I do that Defender will immediately start to remove files from the drive.

    In other words, I need to exclude a drive letter before I plug the drive in.

    • Ramhound
      Ramhound over 8 years
      You can mount a .ISO, any .ISO, and setup the exclusion. After you do that, unmount the .ISO, and assigned the drive the same drive letter. You can also configure defender not to act on its own without user intervention.
    • magicandre1981
      magicandre1981 over 8 years
      temporarily disable runtime scanning, connect the drive, exclude the drive in option and turn runtime scanning one
  • Arete
    Arete about 8 years
    First suggestion works like a charm. Thanks a lot!