Commit c4a8164
Probe MSIX-private AppData for claude.exe (elevated-shell case)
Field bug: detection still failed for a user whose only claude.exe was
under %APPDATA%\Claude\claude-code\<ver>\claude.exe. Diagnostics showed
the probe found "does NOT exist" -- yet the file was clearly accessible
from another process. Cause: Claude Desktop ships as an MSIX package
(Claude_<hash>) and the OS only applies the %APPDATA%\Claude redirect
to processes inside the MSIX container. A regular PowerShell session,
not a child of the MSIX app, sees the redirect target as empty/absent
and has to read the underlying real path at
%LOCALAPPDATA%\Packages\Claude_<hash>\LocalCache\Roaming\Claude\claude-code\<ver>\claude.exe.
Resolve-RfClaudeCliPath now builds a list of candidate code roots:
1) %APPDATA%\Claude\claude-code (visible from MSIX context)
2) %LOCALAPPDATA%\Packages\Claude_*\LocalCache\Roaming\Claude\claude-code
(real filesystem path -- visible from any process)
APPDATA wins when both resolve, since it's the user-facing path. The
same logic feeds Show-RfDetectDiagnostics so future failure dumps list
every probe attempted.
Two new Pester cases cover (a) the MSIX-private path being the only
hit and (b) the APPDATA-wins-over-MSIX precedence. Required tightening
isolation in the Test-RfHostClaudeCodeCli Describe block so LOCALAPPDATA
gets pointed at the isolated home too -- otherwise the new probe finds
the developer's real install during tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 36dd48a commit c4a8164
2 files changed
Lines changed: 86 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
70 | 98 | | |
71 | 99 | | |
72 | 100 | | |
| |||
357 | 385 | | |
358 | 386 | | |
359 | 387 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
364 | 402 | | |
365 | | - | |
| 403 | + | |
366 | 404 | | |
367 | 405 | | |
368 | 406 | | |
| |||
371 | 409 | | |
372 | 410 | | |
373 | 411 | | |
374 | | - | |
| 412 | + | |
375 | 413 | | |
376 | 414 | | |
377 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
79 | 106 | | |
80 | 107 | | |
81 | 108 | | |
| |||
142 | 169 | | |
143 | 170 | | |
144 | 171 | | |
145 | | - | |
146 | | - | |
147 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
148 | 178 | | |
149 | 179 | | |
150 | 180 | | |
151 | | - | |
| 181 | + | |
| 182 | + | |
152 | 183 | | |
153 | 184 | | |
154 | 185 | | |
| |||
0 commit comments