Why it happens
A setup file is a new program that unpacks files, may create a scheduled task for automatic updates and may later run downloaded setup files. Detections based on machine learning (in Microsoft Defender, names ending in!ml) sometimes react to that behavior before anyone has looked at the file.
In Bach’s own testing on Windows 11 with Microsoft Defender, a few test setup files were flagged with !ml detections such as Behavior:Win32/Persistence.A!ml. The flagged files were the ones with automatic updates (which create a scheduled task) and update patches. Plain installers weren’t flagged in those runs, and bach.exe itself wasn’t either. Your results may differ.
What helps
- Sign your setup file with a timestamp. Signed files from a known publisher are trusted more, and the reputation carries over to your next releases.
- Report false positives to the antivirus vendor. For Defender, upload the file at Microsoft’s submission page as a software developer and say it’s a Bach setup file.
- Only ask for what you need. Don’t turn on administrator rights or automatic updates if you don’t use them.
- On your build computer, if Defender quarantines a test build, restore it from Windows Security > Protection history, or exclude only your build output folder. Bach never changes antivirus settings.
Get-MpThreatDetection in PowerShell lists what Defender has detected.
If a user reports a warning, ask for the exact detection name and the file’s SHA-256 (bach verify or Get-FileHash), and check that they downloaded the file from your own website or release page.