To display this progress in your application's UI, you must pass data from the (where the updater runs) to the Renderer Process (where the UI lives) using Electron's IPC (Inter-Process Communication) modules. 1. Setup in the Main Process
: You can also use the BrowserWindow.setProgressBar() method to show progress on the application's dock or taskbar icon by passing a value between 0 and 1. javascript electron auto update download-progress
The electron-updater module emits the download-progress event periodically while a new version is being downloaded. This event returns a ProgressInfo object containing critical metrics: : Current download speed. percent : Percentage of the download completed (0 to 100). total : Total size of the update in bytes. transferred : Total bytes downloaded so far. Implementation Workflow To display this progress in your application's UI,
: Be aware that many auto-update features, including download events, often only trigger once the application is fully packaged . GitHubhttps://github.com Autoupdater - progress and download choice · Issue #16561 total : Total size of the update in bytes
// main.js const { autoUpdater } = require("electron-updater"); autoUpdater.on('download-progress', (progressObj) => { // Send progress data to the renderer process mainWindow.webContents.send('download-progress', progressObj); }); Use code with caution. 2. Visualizing Progress in the UI
Implementing a download progress bar for Electron updates improves user experience by providing clear feedback during large file transfers. While Electron's native autoUpdater module lacks a built-in progress event, the popular electron-updater package provides a dedicated download-progress event to track update status. Core Concept: The download-progress Event
: The standard Electron autoUpdater (based on Squirrel) does not support progress events. Switching to electron-updater is the standard solution for developers requiring this feature.