Skip to main content
Squirrel.Windows target is maintained, but deprecated. Please use NSIS instead.
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.

Configuration

iconUrl
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.
Local icon file url is not accepted, must be https/http.
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.
loadingGif
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).
msi
boolean
default:"false"
Whether to create an MSI installer. Defaults to false (MSI is not created).
remoteReleases
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.
remoteToken
string
Authentication token for remote updates.
useAppIdAsId
boolean
default:"false"
Use appId to identify package instead of name.
customSquirrelVendorDir
string
The custom squirrel vendor dir. If not specified will use the Squirrel.Windows that is shipped with electron-installer.
name
string
Private option for package name override.
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:
{
  "build": {
    "win": {
      "target": "nsis"
    },
    "nsis": {
      "oneClick": true,
      "perMachine": false,
      "allowToChangeInstallationDirectory": false,
      "deleteAppDataOnUninstall": false
    }
  }
}
  1. Remove Squirrel.Windows startup event handling code (if using electron-squirrel-startup)
  2. Update your auto-updater implementation to use NSIS-compatible updates
See the NSIS configuration documentation for more details on available options.

Example Configuration

{
  "build": {
    "win": {
      "target": "squirrel"
    },
    "squirrelWindows": {
      "iconUrl": "https://example.com/icon.ico",
      "loadingGif": "build/install-spinner.gif",
      "remoteReleases": true
    }
  }
}
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:
  • artifactName
  • publish

Build docs developers (and LLMs) love