Skip to content

Fix Windows installer to perform in-place upgrades#2

Open
elcruzo wants to merge 1 commit intomainfrom
elcruzo/fix-windows-installer-upgrade
Open

Fix Windows installer to perform in-place upgrades#2
elcruzo wants to merge 1 commit intomainfrom
elcruzo/fix-windows-installer-upgrade

Conversation

@elcruzo
Copy link
Copy Markdown
Member

@elcruzo elcruzo commented Mar 22, 2026

Summary

  • Root cause: NSIS script embedded TRACE_VERSION in install path (Trace\1.2.0), registry keys (Trace 1.2.0), shortcuts, file associations, and mutex — causing each version to install as a completely separate application instead of upgrading in-place
  • Removed version from all install identifiers (install dir, registry keys, Start Menu path, shortcuts, file associations, AppModelId, mutex) so new versions overwrite the previous installation at C:\Program Files\Trace\
  • Added RemoveOldVersionedInstalls migration function that runs on install to detect and silently remove old versioned installations (1.0.0, 1.1.0, 1.2.0) via registry lookup + silent uninstall + stale directory/shortcut cleanup
  • Display name in Add/Remove Programs still shows version (e.g. "Trace 1.3.0") so users know which version they have

Test plan

  • Build the installer with a test version (e.g. 1.3.0)
  • Install on a machine that has an existing versioned install (e.g. 1.1.0 or 1.2.0 at C:\Program Files\Trace\1.2.0\)
  • Verify the old versioned install is silently removed during installation
  • Verify new install goes to C:\Program Files\Trace\ (no version subfolder)
  • Verify only one "Trace" entry appears in Add/Remove Programs (not "Trace 1.1.0" + "Trace 1.3.0")
  • Verify Start Menu shortcut is Trace not Trace 1.3.0
  • Verify Desktop shortcut is Trace not Trace 1.3.0
  • Verify uninstaller correctly removes the non-versioned install
  • Test fresh install on a clean machine (no previous versions)

…-side installs

The NSIS script embedded TRACE_VERSION in the install directory, registry keys,
shortcuts, file associations, and mutex name. This caused each new version to
install as a separate application (e.g. C:\Program Files\Trace\1.1.0\ and
C:\Program Files\Trace\1.2.0\) instead of upgrading in-place.

Changes:
- Remove version from MULTIUSER_INSTALLMODE_INSTDIR (Trace\1.2.0 -> Trace)
- Remove version from registry uninstall key (Trace 1.2.0 -> Trace)
- Remove version from PRODUCT_UNINST_KEY, SMPATH, shortcuts, file associations,
  AppModelId, and installer mutex
- Add RemoveOldVersionedInstalls migration that detects and silently removes
  old versioned installations (1.0.0, 1.1.0, 1.2.0) via registry lookup,
  silent uninstall, and stale directory/shortcut cleanup
- Keep version in MULTIUSER_INSTALLMODE_DISPLAYNAME for Add/Remove Programs
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