Skip to main content
The top-level msi key contains set of options instructing electron-builder on how it should build MSI (Windows Installer) packages using WiX Toolset. MSI installers provide a traditional Windows installation experience with built-in features like repair, modify, and clean uninstall through Windows Control Panel.

Configuration

oneClick
boolean
default:"true"
One-click installation.
upgradeCode
string
The upgrade code. Optional, by default generated using app id.The upgrade code is a GUID that uniquely identifies the product family. All versions of a product share the same upgrade code. This allows Windows Installer to recognize that a new version should upgrade an older version.
warningsAsErrors
boolean
default:"true"
If warningsAsErrors is true (default): treat warnings as errors. If warningsAsErrors is false: allow warnings.
additionalWixArgs
string[]
Any additional arguments to be passed to the WiX installer compiler, such as ["-ext", "WixUtilExtension"]These arguments are passed directly to the candle.exe compiler.
additionalLightArgs
string[]
Any additional arguments to be passed to the light.exe linker, such as ["-cultures:ja-jp"]The light.exe tool is the WiX linker that combines compiled object files into the final MSI package.

Common Installer Options

perMachine
boolean
default:"false"
Whether to install per all users (per-machine).
runAfterFinish
boolean
default:"true"
Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.
createDesktopShortcut
boolean | 'always'
default:"true"
Whether to create desktop shortcut. Set to always if to recreate also on reinstall (even if removed by user).
createStartMenuShortcut
boolean
default:"true"
Whether to create start menu shortcut.
menuCategory
boolean | string
default:"false"
Whether to create submenu for start menu shortcut and program files directory. If true, company name will be used. Or string value.
shortcutName
string
The name that will be used for all shortcuts. Defaults to the application name.

WiX Toolset

electron-builder uses the WiX Toolset to create MSI installers. WiX must be installed on the build machine or will be downloaded automatically. The MSI target provides:
  • Traditional Windows installation experience
  • Built-in support for repair and modify operations
  • Clean uninstall through Windows Control Panel
  • Per-machine or per-user installation options
  • Integration with Windows Installer service

Example Configuration

{
  "build": {
    "win": {
      "target": "msi"
    },
    "msi": {
      "oneClick": false,
      "perMachine": true,
      "createDesktopShortcut": true,
      "createStartMenuShortcut": true,
      "menuCategory": true,
      "runAfterFinish": true
    }
  }
}
win:
  target: msi
msi:
  oneClick: false
  perMachine: true
  createDesktopShortcut: true
  createStartMenuShortcut: true
  menuCategory: true
  runAfterFinish: true

Inherited Properties

The following properties are inherited from Common Configuration:
  • artifactName
  • publish

Build docs developers (and LLMs) love