Skip to main content
Every setup file also installs without a window, for IT tools and scripts. You do not configure anything for this in bach.toml: the flags are part of the runtime every setup file is built from.
A setup file is a windowed program, so a shell does not wait for it. Running .\Hello-Setup-1.4.0.exe --silent directly installs but returns at once, without an exit code. Start-Process -Wait -PassThru waits and gives you the exit code. PowerShell also needs the .\ in front of a file in the current folder. In cmd, use start /wait and read the exit code from %ERRORLEVEL%:

Flags

Every flag is one text in the argument list. A path with spaces gets its own quotes:

What a silent run does for the user

  • It accepts the license on the user’s behalf.
  • It stops when a requirement is missing, with exit code 1.
  • It applies the same checks as the window: free space, the app not running and the archive checksum.

Machine-wide setup files

A setup file with installer.scope = "machine" needs administrator rights, so a silent run started without them shows Windows’ administrator prompt first and ends with code 1 if it is declined. A deployment tool that runs setup elevated or as SYSTEM sees no prompt. See machine-wide installs.

Silent uninstall

Settings › Apps runs uninstall.exe --silent for a quiet removal. You can run it yourself:
%LOCALAPPDATA% is cmd syntax. PowerShell writes it $env:LOCALAPPDATA. Add --delete-data to delete the user’s data folders too. A silent removal works in place, so whoever started it can wait for its exit code.

Exit codes

Logs

Every run, silent or not, writes %TEMP%\<app id>-setup.log, or the file you pass with --log. It lists the steps and, when something fails, why. Logging never holds setup up. Read it when something fails instead of guessing.

winget

Because setup files accept --silent (and install per user unless installer.scope = "machine"), they work with the Windows Package Manager. See List your app in winget.