3

When I use Gradle, Windows Defender keeps popping up and want to send the files to their server. The download file has this pattern:

%USERPROFILE%\AppData\Local\Temp\gradle_downloadxxxxxxxxxxxxxxxxxxxxxxxxbin

Can I exclude them with file mask? I don't see it in the settings of Windows Defender.

I don't want to exclude the whole folder because I want other downloaded files to be scanned.

WesternGun
  • 11,303
  • 6
  • 88
  • 157

1 Answers1

3

OK I have found this:

Windows Defender - Add exclusion folder programmatically

with elevated cmd, you can do:(change me to your username)

powershell -inputformat none -outputformat none -NonInteractive -Command Add-MpPreference -ExclusionPath "C:\Users\me\AppData\Local\Temp\gradle_download*"

And check Windows Defender settings, you will see your mask there. It is working now.

WesternGun
  • 11,303
  • 6
  • 88
  • 157
  • Use with caution though, maybe some malware will disguise themselves as these gradle download files? Remember to check them regularly. – WesternGun Oct 06 '19 at 16:31