Skip to content

Windows Installer Exit Codes

OneSeventyFour edited this page Jun 22, 2026 · 1 revision

Windows installer exit / return codes

This page documents every return (exit) code that the Backyard Hero Windows installer and application executables can produce. It exists so the Microsoft Store certification process (and any automated/managed deployment, e.g. Intune/MDM) has an authoritative reference for "miscellaneous EXE return code values."

The Windows installer (Backyard Hero Setup <version>.exe) is a per-user NSIS installer produced by electron-builder. It uses NSIS's standard error levels — it does not define any custom/extra exit codes.

Installer: Backyard Hero Setup <version>.exe

Return code Meaning Category
0 Normal execution — installation completed successfully. Success
1 Installation aborted by the user (the user pressed Cancel / closed the installer before it finished). Cancelled by user
2 Installation aborted by the installer script (an error occurred during installation and setup could not complete). Failure

Notes:

  • No reboot is ever required. This is a per-user install (perMachine: false) that writes only to the current user's profile and requires no administrator rights, so the installer never returns a "reboot required" (3010-style) code.
  • These are the standard NSIS error levels. The installer does not call SetErrorLevel with any additional/custom values.
  • Codes other than 0, 1, or 2 do not originate from this installer. If a calling process observes a different value (for example 9009), it typically reflects the shell/launcher failing to start the executable rather than a result reported by the installer itself.

Uninstaller: Uninstall Backyard Hero.exe

Return code Meaning Category
0 Normal execution — uninstall completed successfully. Success
1 Uninstall aborted by the user. Cancelled by user
2 Uninstall aborted by the script (an error occurred during removal). Failure

The NSIS uninstaller relaunches itself from a temporary directory so it can delete its own files. When invoked directly, capture the exit code with ExecWait '"…\Uninstall Backyard Hero.exe" /S' $0 (or run the silent uninstall and inspect %ERRORLEVEL%) to read the final result.

Application executable: Backyard Hero.exe

The installed application is an Electron desktop app. On a clean shutdown it returns 0. A non-zero value indicates an abnormal termination (an unhandled crash or a forced kill by the OS); the app does not define its own catalogue of application-level exit codes.

Return code Meaning
0 Normal application exit.
non-zero Abnormal termination (crash or forced process kill).

Silent / unattended command-line switches

For automated or managed deployment:

Action Command
Silent install "Backyard Hero Setup <version>.exe" /S
Silent install to a specific directory "Backyard Hero Setup <version>.exe" /S /D=C:\Path\To\Install
Silent uninstall "%LOCALAPPDATA%\Programs\Backyard Hero\Uninstall Backyard Hero.exe" /S

/S runs the (un)installer silently. /D= (must be last, unquoted, no surrounding quotes even if the path contains spaces) sets the installation directory. All of the exit codes above apply identically in silent mode.

The uninstall path above is the default per-user location; because the install directory is user-selectable, the authoritative uninstall command for a given machine is stored in the registry under HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\ (the Backyard Hero entry's QuietUninstallString).

See also

Clone this wiki locally