Skip to content

The installer's welcome pages, and the uninstaller's "Also remove settings and logs" - #54

Merged
WillTDA merged 2 commits into
masterfrom
installer-welcome
Oct 11, 2026
Merged

WillTDA merged 2 commits into
masterfrom
installer-welcome

Conversation

@WillTDA

@WillTDA WillTDA commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

The installer opens on a welcome page, and the uninstaller's welcome page asks whether to remove the app's settings and logs.

The installer. customWelcomePage adds MUI's welcome page before "Who it's for": "Welcome to Setup", then "This installs on your computer. You'll choose who it's for, the files it opens and its shortcuts." (an app with no file types leaves out the files) and "Click Next to continue." An update never shows it.

The uninstaller. customUnWelcomePage: "Uninstall ", "This removes from your computer. Close it first if it's open.", an unticked "Also remove settings and logs" box, then "Click Next to continue." The box is added in the page's show function, on the page's background. The text is measured in its own font so the box always sits a line under it, however the name wraps. With the box ticked, or with --delete-app-data, customUnInstall removes the same folders electron-builder's --delete-app-data does ($APPDATA\${APP_FILENAME}, ${APP_PRODUCT_FILENAME}, ${APP_PACKAGE_NAME}, in the person's own context). It retries for up to five seconds when a file it has just deleted still holds the folder: locally, electron-builder's single try left an empty folder behind about half the time. An update's uninstall never removes them, and a silent uninstall keeps them unless given --delete-app-data.

config() now also refuses nsis.deleteAppDataOnUninstall and nsis.removeDefaultUninstallWelcomePage.

Proved by:

  • check-installer.ps1: with %APPDATA%\electron-kit Demo seeded with a marker file, an update (--updated) and a silent uninstall keep it, and /S --delete-app-data removes it. It now waits for the uninstall to finish, and for every one of the app's processes to stop after --force-run.
  • capture-installer.ps1: saves both welcome pages, ticks the uninstaller's box after its picture, and fails if the folder survives.
  • npm test: 259 pass (3 new tests).
  • docs/building.md: updated.

Locally: built with -WX, check-installer.ps1 passed 4 times in a row once the retry was in, and the capture saved 7 pages with the folder gone afterwards.

…ther to remove settings and logs

customWelcomePage says what the installer will ask (D144), skipped on an update. customUnWelcomePage adds an unticked "Also remove settings and logs" box under its text; ticked, or with --delete-app-data, customUnInstall removes the app's folders in the person's own app data, as electron-builder does, trying again for a few seconds while a file just deleted still holds its folder. Never on an update. config() owns nsis.deleteAppDataOnUninstall and nsis.removeDefaultUninstallWelcomePage.
… capture-installer.ps1 ticks the uninstaller's box

With %APPDATA%\electron-kit Demo seeded, an update and a silent uninstall keep it and --delete-app-data removes it. The capture saves both welcome pages, ticks "Also remove settings and logs" after its picture and fails if the folder is still there. check-installer.ps1 now waits for the uninstall to finish, and for every one of the app's processes to stop after --force-run.
@WillTDA
WillTDA merged commit f972c79 into master Oct 11, 2026
9 checks passed
@WillTDA
WillTDA deleted the installer-welcome branch October 11, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant