Windows Defender deleting my own applications

Dear Community (and Microsoft),

So I'm a software engineer and I was working on one of my projects in Python on Windows (it is a Windows application so whatever) and today, I have turned on my Windows 10 updated computer, fired up Visual Studio Code, applied some hotfixes and then tried to compile it to .exe via pyinstaller library to prepare it for distribution. But immediately after I've entered pyinstaller command in cmd, a super useful and effective anti-virus named Windows Defender decided to erase these things (for some reason):

  • All .exe files on my computer that I myself wrote and compiled (meaning all distribution files for my apps on my local computer)
  • Bootloader .exe from pyinstaller library (meaning I no longer can compile my next .py files to .exe)

So now, I'm stuck with all of my own .exe files deleted (including small scripts for my servers' automation as well as distribution .exe files for all of my apps - doesn't include installers, but at this point, I wouldn't be even surprised...) without any chance of me to compile it again, since Windows Defender keeps deleting pyinstaller's bootloader every time I try to run it after a fresh installation.

I don't want to set up some mumbo jumbo exceptions for literally ALL of my programs and bootloader plus I expect this behavior on clients using my apps as well, and as a developer, I'm NOT happy about it, let alone deleting it on my local machine. For the love of God, I literally wrote code, if there will be some tRoJaN I would know about it!

I want to point out that my friend that is working with Python .exe compiled files and pyinstaller library has this problem too. This is not a pyinstaller's fault, it's a Windows Defender fault since Windows Defender is deleting files that absolutely have nothing to do with viruses. But I guess that's why it is default and free anti-virus...

I want Microsoft to fix this as soon as possible because THEY have taken from me (and maybe from some of you guys as well?) ability to create programs that at the end of the day will be used on their OS and will add functionality and reason why to use Windows... I'm literally paying around 120€ for an OS that is automatically destroying my own .exe files. For now, I have lost another reason why would I use Windows...

Thanks Defender!

* Moved from Windows 10

Answer
Answer

While I'm developing my software, I have it open and compiling it in a special folder that is set up such that Defender ignores it. You can set up it too. Search Windows Security in Windows settings, open Virus & threat protection, under Virus & threat protection settings heading click on Manage settings and by clicking on the second last link Add or remove exclusions under Exclusions heading, you can set up to ignore files, folders, file types or process. Or alternatively, as already mentioned, we can download another anti-virus, but remember that we aren't the only one using our software and clients can be using default Windows Defender...

However, this does not solve this problem, since still, other people will still get warnings and errors. I'm stuck at this too and if I will find something useful, I will share it here. For now, it's sad that Microsoft hasn't provided any instruction on how to proceed in this situation.

Thank you brother,

this really worked .....

thanks a lot again ❤💕

18 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated March 12, 2025 Views 11,096 Applies to: