Skip to content

[BUG] OTA update creates duplicate entry in Windows "Apps & Features" #873

@parkghost

Description

@parkghost

Before You Submit

Searched existing issues. #562 describes a related symptom (NSIS install requiring admin for OTA) but not the duplicate entry problem.

Bug Description

After installing Handy via the NSIS installer (setup.exe) and updating through OTA, Windows "Apps & Features" shows two separate entries — the old version and the new version are not replaced/upgraded in-place.

Windows registry confirms the two entries are from different installer types:

Original install After OTA
Version 0.7.5 0.7.7
Registry HKCU\...\Uninstall\Handy HKLM\...\Uninstall\{25D6A665-...}
UninstallString "...\Handy\uninstall.exe" (NSIS) MsiExec.exe /X{...} (MSI)
Scope Per-user (HKCU) Per-machine (HKLM)

Root Cause Analysis (via Claude Code)

The root cause was identified through codebase and upstream analysis using Claude Code:

  1. tauri.conf.json has "targets": "all", which builds both NSIS (.exe) and MSI (.msi) installers.

  2. The OTA manifest latest.json maps the default platform key to MSI:

    • windows-x86_64.msi
    • windows-x86_64-nsissetup.exe
  3. When a user installs via NSIS but the updater downloads MSI, the MSI creates a separate Windows registry entry (HKLM, per-machine) instead of upgrading the existing NSIS installation (HKCU, per-user).

  4. Upstream reference: tauri-apps/tauri#12365 fixed the NSIS/MSI install directory mismatch (already included in Handy's Tauri v2.9.1), but it does not prevent duplicate registry entries — NSIS and MSI use fundamentally different Windows registry mechanisms.

Suggested Fix

Change "targets": "all" in tauri.conf.json to only include NSIS for Windows:

"targets": ["nsis", "deb", "rpm", "appimage", "dmg"]

This would:

Caveat: Users who originally installed via MSI will no longer receive OTA updates (no MSI entry in latest.json). They would need to manually uninstall the MSI version and reinstall using the NSIS installer once. There is no automatic migration path due to Tauri's updater selecting the installer type based on the bundle type embedded at compile time. This should affect a small number of users since the MSI installer requires admin rights and most users install via the NSIS setup.exe.

System Information

App Version: 0.7.5 → 0.7.7 (via OTA)

Operating System: Windows 11

CPU: x64

GPU: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions