Commit 4b4ae80
Installer (Windows) - Detect install method (#1039)
* detect if installed via store
* update per gemini comments
* Address PR feedback: Get-AppxPackage detection + docs pointers
Replace the filesystem-glob MSIX detection with `Get-AppxPackage` as the
primary path. The package registry is authoritative — it doesn't match the
zombie %LOCALAPPDATA%\Packages\Claude_* folders Windows leaves in place
(sometimes under Deleted\) for days after an MSIX uninstall, which would
otherwise trigger the same silent failure inverted (user moves Store →
traditional, installer writes into the dead Store folder).
The filesystem probe stays as a fallback for constrained environments
(e.g. Windows Sandbox, locked-down PowerShell). It is now pinned to the
Anthropic publisher hash `Claude_pzs8sxrjxfjjc` so we don't pick up an
unrelated SKU like a hypothetical Anthropic.ClaudeDesktop_*, and gated on
a Test-Path of LocalCache\Roaming\Claude so a stale leftover folder can't
trigger the silent failure either.
Other changes from the review:
- Surface "Detected: Microsoft Store install" / "Traditional install"
under Step 2 so users notice immediately if detection picks the wrong
variant when both installs are present.
- Reword the comment that said "under LocalPackages" — the path is
%LOCALAPPDATA%\Packages.
- Fix a silent rendering bug in site/src/pages/guide-windows.astro: the
detection one-liner had raw `{` / `}` inside `<code>`, which Astro
parsed as JSX expressions, stripping the curly braces and backslashes
from the rendered HTML. Wrap the snippet in a `{`...`}` template
literal so braces and backslashes render literally, and switch to the
Get-AppxPackage approach for consistency with the installer.
- Mirror the snippet in docs/Windows-uv-guide.md (markdown twin of the
Astro guide).
- Rather than duplicate the detection snippet in every doc that mentions
the config path, point the remaining docs to the Windows setup guide:
docs/FAQ.md, docs/dev-channel.md, homeassistant-addon/DOCS.md,
site/src/content/clients/claude-desktop.md, site/src/data/clients.ts,
site/src/pages/faq.astro.
Fixes the silent failure reported in #1046 (Microsoft Store install,
installer wrote to %APPDATA%, Claude Desktop reads from %LOCALAPPDATA%).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Address review-toolkit findings on install-windows.ps1
- Drop the inaccurate "Windows Sandbox" example in the fallback comment;
the Appx module ships in the default Sandbox image. Replace with the
cases that actually break Get-AppxPackage: Constrained Language Mode
under WDAC/AppLocker, Server Core / Nano installs.
- Drop the unverifiable "for days" claim on stale package folders. The
asynchronous-cleanup behavior is real but no published bound exists,
and the next sentence already justifies the hardening.
- Tighten the leading comment block — "different installers write to
different roots" was borderline WHAT-explanation.
- Bump the "Detected:" line to Cyan and echo the resolved $ConfigDir on
the next line so users can sanity-check the actual path before the
installer writes the config. White-on-default got lost in the rest of
the script's output, defeating the point of the line.
- Drop a dead try/catch{} around `Get-Command uvx -ErrorAction
SilentlyContinue`. The cmdlet's SilentlyContinue already handles
"not found"; the catch could only fire on terminating errors and
silently swallow them, leaving the user with no signal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: kingpanther13 <kingpanther13@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4bbc74b commit 4b4ae80
8 files changed
Lines changed: 52 additions & 12 deletions
File tree
- docs
- homeassistant-addon
- scripts
- site/src/pages
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
9 | 35 | | |
10 | 36 | | |
11 | 37 | | |
| |||
18 | 44 | | |
19 | 45 | | |
20 | 46 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 47 | + | |
25 | 48 | | |
26 | 49 | | |
27 | 50 | | |
| |||
44 | 67 | | |
45 | 68 | | |
46 | 69 | | |
| 70 | + | |
| 71 | + | |
47 | 72 | | |
48 | 73 | | |
49 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments