Electron Auto-Updater via Renderer (Frontend) Manipulation

Meriç Melike Yılmaz
5 min readAug 8, 2019

electron-builder presents a delightful auto-update flow for Electron apps that gives you a lot of flexibility about how, where and when you want to serve and update your application. Once you integrate it in your electron app, it works beautifully with checkForUpdatesAndNotify where the app will automatically check for updates and notify the user if there is an update they can install. The update is then automatically installed when the app is closed. Here, we will take a different road and manipulate the app-update lifecycle from the frontend (in the case of Electron, the renderer), and let the end-user decide what to do with it.

We want the frontend to tell the electron main process proactively if (1) it should check for updates, (2) it should download the found update, (3) it should quit the app and install the downloaded update.

Why would you want this?

To inform your user about what is going on when you are initializing your app. Show meaningful messages about the state of your process and allow the user to intervene/continue/cancel as they wish.

If you want to use the default checkForUpdatesAndNotify and not…

--

--

Meriç Melike Yılmaz

Head of Engineering @ envanterium & Co-founder @ walbit.io — Formerly @ bunq — IEL’12, KU’17