-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[BUG] OTA update creates duplicate entry in Windows "Apps & Features" #873
Description
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:
-
tauri.conf.jsonhas"targets": "all", which builds both NSIS (.exe) and MSI (.msi) installers. -
The OTA manifest
latest.jsonmaps the default platform key to MSI:windows-x86_64→.msiwindows-x86_64-nsis→setup.exe
-
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).
-
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:
- Eliminate the NSIS/MSI mismatch
- Ensure OTA always uses the same installer type
- Also resolve [BUG] install with .exe cannot update itself without admin rights #562 (OTA requiring admin rights)
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