> ## 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.

# Squirrel.Windows Configuration

> Configuration options for Squirrel.Windows installer in electron-builder

<Warning>
  Squirrel.Windows target is maintained, but **deprecated**. Please use [NSIS](/configuration/nsis) instead.
</Warning>

The top-level `squirrelWindows` key contains set of options instructing electron-builder on how it should build Squirrel.Windows.

## Requirements

To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.

To build for Squirrel.Windows on macOS, please install `mono` (`brew install mono`).

Your app must be able to handle Squirrel.Windows startup events that occur during install and uninstall. See [electron-squirrel-startup](https://github.com/mongodb-js/electron-squirrel-startup).

## Configuration

<ParamField path="iconUrl" type="string">
  A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). Defaults to the Electron icon.

  <Warning>
    Local icon file url is not accepted, must be https/http.
  </Warning>

  If you don't plan to build windows installer, you can omit it. If your project repository is public on GitHub, it will be `https://github.com/${u}/${p}/blob/master/build/icon.ico?raw=true` by default.
</ParamField>

<ParamField path="loadingGif" type="string">
  The path to a .gif file to display during install. `build/install-spinner.gif` will be used if exists (it is a recommended way to set) (otherwise [default](https://github.com/electron/windows-installer/blob/master/resources/install-spinner.gif)).
</ParamField>

<ParamField path="msi" type="boolean" default="false">
  Whether to create an MSI installer. Defaults to `false` (MSI is not created).
</ParamField>

<ParamField path="remoteReleases" type="string | boolean">
  A URL to your existing updates. Or `true` to automatically set to your GitHub repository. If given, these will be downloaded to create delta updates.
</ParamField>

<ParamField path="remoteToken" type="string">
  Authentication token for remote updates.
</ParamField>

<ParamField path="useAppIdAsId" type="boolean" default="false">
  Use `appId` to identify package instead of `name`.
</ParamField>

<ParamField path="customSquirrelVendorDir" type="string">
  The custom squirrel vendor dir. If not specified will use the Squirrel.Windows that is shipped with electron-installer.
</ParamField>

<ParamField path="name" type="string">
  Private option for package name override.
</ParamField>

## Why NSIS is Recommended

NSIS is the recommended installer format for Windows because:

1. **Better maintained**: NSIS receives more active development and updates
2. **More flexible**: Extensive customization options through scripts
3. **Smaller size**: Better compression results in smaller installer files
4. **Modern features**: Better support for Windows 10/11 features
5. **One-click installation**: Default one-click installer with optional assisted mode
6. **Auto-updates**: Better integration with electron-updater
7. **Code signing**: More robust code signing support

## Migrating from Squirrel.Windows to NSIS

To migrate from Squirrel.Windows to NSIS:

1. Remove the `electron-builder-squirrel-windows` dependency
2. Update your configuration:

```json theme={null}
{
  "build": {
    "win": {
      "target": "nsis"
    },
    "nsis": {
      "oneClick": true,
      "perMachine": false,
      "allowToChangeInstallationDirectory": false,
      "deleteAppDataOnUninstall": false
    }
  }
}
```

3. Remove Squirrel.Windows startup event handling code (if using `electron-squirrel-startup`)
4. Update your auto-updater implementation to use NSIS-compatible updates

See the [NSIS configuration documentation](/configuration/nsis) for more details on available options.

## Example Configuration

```json theme={null}
{
  "build": {
    "win": {
      "target": "squirrel"
    },
    "squirrelWindows": {
      "iconUrl": "https://example.com/icon.ico",
      "loadingGif": "build/install-spinner.gif",
      "remoteReleases": true
    }
  }
}
```

```yaml theme={null}
win:
  target: squirrel
squirrelWindows:
  iconUrl: https://example.com/icon.ico
  loadingGif: build/install-spinner.gif
  remoteReleases: true
```

## Inherited Properties

The following properties are inherited from [Common Configuration](/configuration/common):

* `artifactName`
* `publish`
