fix(installer): refresh Windows icon cache after in-place update - #55
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NSIS_HOOK_POSTINSTALLthat runsie4uinit.exe -show+ broadcastsSHChangeNotify(SHCNE_ASSOCCHANGED)so Windows drops the pre-update icon fromiconcache_*.dbafter Tauri's auto-updater swaps the binary in place.bundle.windows.nsis.installerHooksintauri.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
.exeswap doesn't invalidate that cache.ie4uinit.exe -showrebuilds the on-disk DB,SHChangeNotifysignals 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 buildsucceeds; NSIS installer produced atsrc-tauri/target/release/bundle/nsis/Agentrium_1.33.0_x64-setup.exeinstaller.nsiincludes!include ".../installer-hooks.nsh"and invokesNSIS_HOOK_POSTINSTALLat the standard post-install site🤖 Generated with Claude Code