> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/electron-userland/electron-builder/llms.txt
> Use this file to discover all available pages before exploring further.

# MSI Configuration

> Configuration options for building MSI installer packages in electron-builder

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

<ParamField path="oneClick" type="boolean" default="true">
  One-click installation.
</ParamField>

<ParamField path="upgradeCode" type="string">
  The [upgrade code](https://msdn.microsoft.com/en-us/library/windows/desktop/aa372375\(v=vs.85\).aspx). 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.
</ParamField>

<ParamField path="warningsAsErrors" type="boolean" default="true">
  If `warningsAsErrors` is `true` (default): treat warnings as errors. If `warningsAsErrors` is `false`: allow warnings.
</ParamField>

<ParamField path="additionalWixArgs" type="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.
</ParamField>

<ParamField path="additionalLightArgs" type="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.
</ParamField>

### Common Installer Options

<ParamField path="perMachine" type="boolean" default="false">
  Whether to install per all users (per-machine).
</ParamField>

<ParamField path="runAfterFinish" type="boolean" default="true">
  Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.
</ParamField>

<ParamField path="createDesktopShortcut" type="boolean | 'always'" default="true">
  Whether to create desktop shortcut. Set to `always` if to recreate also on reinstall (even if removed by user).
</ParamField>

<ParamField path="createStartMenuShortcut" type="boolean" default="true">
  Whether to create start menu shortcut.
</ParamField>

<ParamField path="menuCategory" type="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.
</ParamField>

<ParamField path="shortcutName" type="string">
  The name that will be used for all shortcuts. Defaults to the application name.
</ParamField>

## WiX Toolset

electron-builder uses the [WiX Toolset](https://wixtoolset.org/) 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

```json theme={null}
{
  "build": {
    "win": {
      "target": "msi"
    },
    "msi": {
      "oneClick": false,
      "perMachine": true,
      "createDesktopShortcut": true,
      "createStartMenuShortcut": true,
      "menuCategory": true,
      "runAfterFinish": true
    }
  }
}
```

```yaml theme={null}
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](/configuration/common):

* `artifactName`
* `publish`
