Skip to content

Fix desktop shortcut icon, upgrade folder, file associations and install mode - #5

Merged
christianhelle merged 4 commits into
mainfrom
feature/kind-volhard-bcd151
Sep 22, 2026
Merged

christianhelle merged 4 commits into
mainfrom
feature/kind-volhard-bcd151

Conversation

@christianhelle

Copy link
Copy Markdown
Owner

Four related fixes to the Windows Inno Setup script. Each one was found while verifying the previous one, and they are best reviewed in order.

What changed

59ab88c — Point the desktop shortcut at the installed icon

IconFilename reused the MyAppIcon define, which is a build-time path relative to the .iss file. On the target machine it expanded to {app}\..\src\resources\icon.ico, which does not exist, so Windows silently fell back to a default icon. Line 40 already installs the icon into {app}, so the shortcut now points at {app}\icon.ico.

This was a regression: the pre-rename shortcut already used the correct form.

1d8f953 — Give the rebranded installer its own AppId

DefaultDirName was correct ({pf64}\SQL Query Analyzer) but never consulted. A matching AppId makes Setup reuse the previous install's remembered directory, so upgrades from sqlitequery-era installs kept landing in the old folder. A fresh GUID means there is no previous install to find.

Chosen over UsePreviousAppDir=no, which would have silently relocated anyone who installed to a custom path and left the old directory orphaned. UsePreviousAppDir stays at its default yes, which is the behaviour we want for future upgrades of the new product.

a8b7242 — Register file associations under an app-specific ProgID

uninsdeletekey was pointed at SQLite Database, a generic ProgID any SQLite tool may claim. Whichever product uninstalled last destroyed the association for the others. The app now owns SQLQueryAnalyzer.sqlite, so uninsdeletekey only removes keys we exclusively own. Also adds OpenWithProgids entries so other tools keep theirs.

f97d032 — Install in 64-bit mode and refuse 32-bit Windows

ArchitecturesInstallIn64BitMode=x64 keeps the uninstall entry in the 64-bit registry view rather than WOW6432Node. ArchitecturesAllowed=x64 is a separate fix found along the way: the installer would previously run on 32-bit Windows and install a 64-bit app that cannot start. The exe's PE machine type is 0x8664 and build.ps1 uses vcvars64, so refusing is correct.

Reviewer notes

These last two commits must release together. Changing install mode relocates the uninstall entry. It is free right now only because the new AppId has never shipped. If 1d8f953 ships without f97d032, users' entries get stranded in WOW6432Node.

Existing installs are treated as a separate product. The new AppId means the old SQLite Query Analyzer stays installed and independently uninstallable rather than being upgraded in place. Users will have both until they remove the old one. That was a deliberate choice over forcing relocation.

Inno Setup 5 syntax throughout (deps/innosetup is the 2018 v5 compiler). x64, not v6's x64os/x64compatible; {pf64}, not {commonpf64}. Verified empirically that {pf64} resolves correctly under 32-bit install mode on v5, which the docs are ambiguous about.

Known limitation, not fixed. uninsdeletevalue clears the .sqlite default value on uninstall; it cannot restore what another tool had set. The blast radius is much smaller than before — the other product's ProgID now survives, so it is one repair-install away and stays reachable via Open With — but a clean restore would need a [Code] block, which this file currently has none of.

Verification

pwsh -NoProfile -File build.ps1 passed before each commit (194 tests pass, 27 skipped — the PostgreSQL/SQL Server/MySQL provider tests needing SQLQUERY_TEST_* env vars).

Each fix was verified with a real install/uninstall cycle on Windows 11, not just by compiling:

before after
shortcut icon broken path, default icon {app}\icon.ico, renders app icon
install dir reused old remembered folder C:\Program Files\SQL Query Analyzer
uninstall entry WOW6432Node\...\Uninstall 64-bit ...\Uninstall
SQLite Database ProgID destroyed on uninstall survives untouched

The installed icon.ico was confirmed byte-identical to src/resources/icon.ico (SHA256 A923D7F4…) and rendered to confirm it is the real artwork rather than a fallback.

Copilot AI lite review requested due to automatic review settings September 22, 2026 13:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • dist/setup.iss is excluded by !**/dist/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4bf517b5-c688-4cba-b6f3-ef331b346f04

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@christianhelle
christianhelle merged commit c243cc4 into main Sep 22, 2026
4 checks passed
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.

2 participants