nsis-installer-autoupdate

Diagnose and configure electron-builder NSIS installers and electron-updater auto-update flows on Windows.

Updated May 13, 2026
One-click install
npx skills add https://github.com/lovebirdsx/universe-editor --skill nsis-installer-autoupdate-lovebirdsx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nsis-installer-autoupdate
Source: https://github.com/lovebirdsx/universe-editor/tree/main/.claude/skills/nsis-installer-autoupdate
Command: npx skills add https://github.com/lovebirdsx/universe-editor --skill nsis-installer-autoupdate-lovebirdsx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Windows desktop apps built with electron-builder often suffer from slow or broken update flows: wizard pages appearing during updates, apps not restarting after install, multi-second stalls from WM_SETTINGCHANGE broadcasts, and Defender scans slowing extraction. This Skill provides the domain knowledge and proven guard chains to make NSIS installers and electron-updater behave correctly. ## Core Features & Use Cases - NSIS hook macro guidance: Documents customInstall, customUnInstall, customInstallMode, and customFinishPage hooks in installer.nsh, plus electron-builder template internals like skipPageIfUpdated and initMultiUser. - Zero-click update design: Explains the guard chain (isUpdated predicates, IfSilent checks, StartApp on finish page) that makes non-silent updates run with a visible progress bar but no user interaction. - Performance root-cause analysis: Covers the WM_SETTINGCHANGE broadcast hang fix using SendMessageTimeout with SMTO_ABORTIFHUNG, Defender exclusion scripts, and update timing measurement via updateShutdownTrace. - Use Case: When a packaged update takes 35 seconds before the new version launches, use this Skill to identify hung-window broadcast blocking and apply the 1-second timeout fix in installer.nsh. ## Quick Start Ask the AI to explain why the electron-updater update flow shows a wizard page or stalls, and to propose the correct installer.nsh hook fix.

Frequently Asked Questions about nsis-installer-autoupdate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make electron-updater install updates without user clicks?

Pass isSilent=false to quitAndInstall for a visible progress window, then guard each wizard page: rely on the template's skipPageIfUpdated for license and directory pages, force per-user mode in customInstallMode, and auto-start the app in customFinishPage when isUpdated is set.

Why is my NSIS installer slow during updates?

The main cause is WM_SETTINGCHANGE broadcasts blocked by hung top-level windows, each adding up to 5 seconds serially. Fix it by calling SendMessageTimeout with SMTO_ABORTIFHUNG and a 1-second timeout instead of the default NSIS SendMessage broadcast.

What NSIS hook macros does electron-builder support?

electron-builder supports preInit, customHeader, customWelcomePage, customInstallMode, customPageAfterChangeDir, customFinishPage, customInstall, customUnInstall, and customRemoveFiles. Define them with !macro in the file referenced by nsis.include, and the template detects them via !ifmacrodef.

Does electron-builder NSIS support per-user installation without elevation?

Yes, set oneClick:false with allowToChangeInstallationDirectory:false and allowElevation:false in electron-builder.yml to lock per-user installs. Use customInstallMode to force the current-user path so neither first install nor update shows the mode selection page.

Why does the app not restart after a non-silent NSIS update?

The assisted installer only auto-launches when isForceRun and silent mode both apply, so a non-silent update finishes without restarting. Handle it in customFinishPage by calling StartApp and Abort in the pre callback when isUpdated is true.

How do I measure the real end-to-end update time on Windows?

Instrument quitAndInstall and app quit events with a cross-process shutdown trace using wall-clock timestamps, then compare against process creation time on next launch. Offline /S /D= installer timing only measures the installer segment, not the full uninstall-install-relaunch chain.