When you build an io.Connect seed app installer for Windows, you can customize the icon displayed for the application in Control Panel → Programs and Features or Add or Remove Programs.
If you’re using the standard Squirrel.Windows installer, this is controlled through the iconUrl setting in your Electron Forge configuration.
Prerequisites
Before configuring the icon, make sure you have:
-
An
.icofile hosted at an HTTPS URL. -
A URL that is accessible from the client machine without an interactive login.
-
Access to the seed app configuration file:
config/forge.config.js.
Configuring the Icon
Open config/forge.config.js and add iconUrl to the existing Squirrel maker configuration. Keep the rest of your configuration unchanged.
{
name: '@electron-forge/maker-squirrel',
config: {
loadingGif: 'assets/install.gif',
iconUrl: 'https://your-domain.com/assets/custom-icon.ico'
}
}
Replace the example URL with the location of your own .ico file.
Building and Testing
-
Run the build command:
npm run build -
Install the generated setup package on Windows.
-
Open Control Panel → Programs and Features or Add or Remove Programs.
-
Verify that the application entry displays your custom icon.
Important Notes
There are a few things to keep in mind:
-
iconUrlvs.setupIcon: These settings control different icons.iconUrlspecifies the icon displayed in the Windows uninstall entry, whilesetupIconcontrols the icon ofSetup.exeitself and accepts a local.icofile. -
The icon must be accessible: Squirrel downloads the
.icofile when creating the uninstall entry and stores it locally. -
Test with a clean installation: Squirrel may retain an
app.icodownloaded during a previous installation. If the icon doesn’t update, verify the configuration using a clean test installation.