A tray app that keeps your "show this icon in the system tray" choices across app updates.
Windows stores tray visibility per executable path in HKCU\Control Panel\NotifyIconSettings\<id>
(ExecutablePath, IsPromoted). Apps whose install path contains a version (Store apps like Spotify,
Squirrel-style app-1.2.3 folders, …) get a fresh entry after every update and the icon falls back to hidden.
BetterTaskbarMemory watches that key. When an entry appears without IsPromoted and an older entry for the
same app (same path once version numbers are ignored, same icon UID/IconGuid) has an explicit value, it
copies that value. Entries with an explicit IsPromoted are never changed.
Requires Visual Studio 2026 (v145 toolset) with the Windows SDK. NuGet packages (Nerdbank.GitVersioning,
WiX Toolset) are restored automatically by VS/Rider; on the command line pass -restore:
msbuild BetterTaskbarMemory.slnx -restore -p:RestorePackagesConfig=true -p:Configuration=Release -p:Platform=x64
bin\x64\Release\Tests.exe
Output in bin\x64\Release\:
BetterTaskbarMemory.exe(static CRT, no redistributables needed)BetterTaskbarMemory.msi(installer)
Versions come from Nerdbank.GitVersioning: version.json
holds major.minor, and the git height (commits since version.json last changed) becomes the build number.
The exe's version resource is generated at build time; nbgv get-version shows the current version.
Bump major/minor by editing version.json (or nbgv set-version 1.1).
installer/ is a WiX Toolset v7 project producing a per-user MSI (no UAC prompt):
- installs to
%LOCALAPPDATA%\Programs\BetterTaskbarMemorywith a Start Menu shortcut; - enables "Start with Windows" and offers to launch the app when setup finishes;
- closes a running instance on upgrade/uninstall; uninstall also removes the autostart entry and
HKCU\Software\BetterTaskbarMemory(the log folder is kept).
The MSI version is taken from the exe, so every commit produces an upgradable installer. If you turn off "Start with Windows" in the app, repairing the MSI turns it back on.
Both workflows build on the windows-2025-vs2026 runner.
.github/workflows/build.ymlruns on every push tomainand every pull request (or manually). It builds, runs the tests, and uploadsBetterTaskbarMemory-<version>-x64.msiand a portable zip (exe + license) as workflow artifacts..github/workflows/release.ymlis triggered manually: Actions → Release → Run workflow onmain. It runsbuild.yml, then publishes a GitHub release taggedv<major.minor.height>with those files and notes generated from the commits since the previous release. Re-running on the same commit fails because the tag already exists.
BetterTaskbarMemory.exe --dry-runprints what it would change and exits without writing.BetterTaskbarMemory.exeruns in the tray. Menu: Fix now, Recent fixes, Pause watching, Show notifications, Start with Windows, Open log, Exit.- Log:
%LOCALAPPDATA%\BetterTaskbarMemory\log.txt. Settings:HKCU\Software\BetterTaskbarMemory.
Back up before the first real run: reg export "HKCU\Control Panel\NotifyIconSettings" backup.reg.
| File | Purpose |
|---|---|
src/PathNormalizer.* |
version-independent path identity (pure) |
src/Fixer.* |
grouping and fix planning (pure, unit-tested) |
src/NotifyIconStore.* |
registry read/write |
src/FixPass.* |
read → plan → write → log |
src/Watcher.* |
RegNotifyChangeKeyValue worker thread with debounce |
src/TrayIcon.*, src/main.cpp |
tray icon, menu (App::BuildMenuItems is where new features plug in) |
res/make-icon.ps1 |
regenerates res/app.ico |
installer/ |
WiX v7 MSI project |