> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Bach builds Windows installers from one bach.toml with the bach command: bach init, bach check, bach preview, bach build. Installs are per user and need no administrator rights by default. installer.scope = "machine" installs for every user after one Windows prompt. On Windows, run setup files with Start-Process -Wait -PassThru in PowerShell, and give signtool arguments that start with the word sign.

# Antivirus warnings on setup files

> What to do when Microsoft Defender or another antivirus flags a Bach setup file: why it happens, what we saw in testing, signing, reporting and the build machine.

Setup files are new, unsigned programs that unpack files, may register a scheduled task for automatic updates and run downloaded setup files. Machine-learning detections in antivirus products (in Microsoft Defender they end in `!ml`) sometimes flag exactly that behavior before anyone has judged the file. This page says what we have seen and what helps.

## What we have seen

Testing Bach on Windows 11 with Microsoft Defender, `Get-MpThreatDetection` listed detections of the setup files that `scripts/e2e.ps1` builds: `Behavior:Win32/Execution.A!ml`, `Behavior:Win32/Persistence.A!ml` and, earlier, two other `!ml` names. The same few outputs were flagged each time: the setup file of the updates test, which has an `[updates]` section and installs a scheduled task, and the update patch of the patch test. Plain setup files without those features were not flagged in these runs. The detections name behavior, not a known malware family, and none came from `bach.exe` itself.

## What helps

* **Sign the setup file** with a code-signing certificate and a timestamp. See [Sign your setup files](/docs/guides/signing.md). A signed file from a known publisher is trusted far more readily, and the reputation carries from one release to the next.
* **Report the false positive** to the vendor. For Microsoft Defender, submit the file at [the file submission page](https://www.microsoft.com/wdsi/filesubmission) as a software developer and say it is a Bach setup file.
* **Keep the behavior honest.** Setup runs without administrator rights unless `installer.scope = "machine"` or a step says `elevated`, and the update task exists only when you offer automatic updates.
* **On your build machine,** if Defender quarantines test builds, restore the file from Windows Security › Protection history, or exclude only the folder the tests build into. Bach never changes antivirus settings itself.

> [!NOTE]
>
> `scripts/e2e.ps1` checks that every setup file it builds can be opened. If Windows refuses, it stops with a sentence that names Defender and the folder. That is a finding about the built file, not a failure of the installer under test.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.