Skip to content

fix(installer): refresh Windows icon cache after in-place update - #55

Merged
talayash merged 2 commits into
masterfrom
fix/installer-icon-cache-refresh
Aug 30, 2026
Merged

fix(installer): refresh Windows icon cache after in-place update#55
talayash merged 2 commits into
masterfrom
fix/installer-icon-cache-refresh

Conversation

@talayash

Copy link
Copy Markdown
Owner

Summary

  • Add NSIS_HOOK_POSTINSTALL that runs ie4uinit.exe -show + broadcasts SHChangeNotify(SHCNE_ASSOCCHANGED) so Windows drops the pre-update icon from iconcache_*.db after Tauri's auto-updater swaps the binary in place.
  • Wire the hook via bundle.windows.nsis.installerHooks in tauri.conf.json.

Why

After installing a new version, the taskbar / Start Menu / pinned shortcuts kept showing the previous logo. Root cause: Windows caches icons per-.exe-path and the auto-updater's in-place .exe swap doesn't invalidate that cache. ie4uinit.exe -show rebuilds the on-disk DB, SHChangeNotify signals Explorer to re-query icon associations for our executable — belt-and-suspenders coverage for the cases where either signal alone gets ignored.

Caveat

This does NOT clear Explorer's per-session in-memory icon cache. Users with a stubbornly stale pin may still need to restart explorer.exe (Task Manager → Windows Explorer → Restart) or log out/in once. That's a Windows limitation that no installer hook can work around cleanly without also killing Explorer during install (bad UX for a silent auto-update).

Test plan

  • npm run tauri build succeeds; NSIS installer produced at src-tauri/target/release/bundle/nsis/Agentrium_1.33.0_x64-setup.exe
  • Generated installer.nsi includes !include ".../installer-hooks.nsh" and invokes NSIS_HOOK_POSTINSTALL at the standard post-install site
  • Installer runs cleanly with no NSIS syntax errors
  • Reviewer sanity check on hook macro contents
  • After merging, ship a patch release and verify a version-to-version upgrade refreshes the taskbar icon without manual Explorer restart

🤖 Generated with Claude Code

talayash and others added 2 commits August 30, 2026 21:40
Windows keeps the pre-update .exe icon in the shell icon cache
(iconcache_*.db) after Tauri's auto-updater swaps the binary in place,
so the taskbar / Start Menu / pinned shortcuts keep showing the old
logo until the user manually refreshes.

Add an NSIS_HOOK_POSTINSTALL macro that runs ie4uinit.exe -show and
broadcasts SHChangeNotify(SHCNE_ASSOCCHANGED). Wire it via
bundle.windows.nsis.installerHooks in tauri.conf.json.

Belt-and-suspenders: ie4uinit rebuilds the on-disk cache DB,
SHChangeNotify signals Explorer to re-query icons for our executable's
associations. Together they cover the cases where either signal alone
is ignored.

Note: this does not clear Explorer's per-session in-memory icon cache;
users with badly stuck pins may still need to restart explorer.exe or
log out. That's a Windows limitation, not something an installer can
work around cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace all 5 screenshots (main view, new session, grid, settings,
profiles) with fresh captures matching the current design, and add
the profiles dialog to the Screenshots section.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@talayash
talayash merged commit 63ffc59 into master Aug 30, 2026
2 checks passed
@talayash
talayash deleted the fix/installer-icon-cache-refresh branch August 30, 2026 18:49
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