Skip to content

fix(agent): tell Windows users how to recover from a failed install - #1499

Merged
AnthonyRonning merged 3 commits into
masterfrom
claude/windows-installer-advice
Nov 8, 2026
Merged

AnthonyRonning merged 3 commits into
masterfrom
claude/windows-installer-advice

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

The Windows installer works out advice for each failure ("Close Maple Work, then run the installer again" when a file is in use), but the dialog has dropped it since #1492 added the native report: when a report exists, the message is rebuilt from scratch without it. Activation failures also printed the full status in decimal as Stage: 1292435488.

Found while validating the signed 0.0.19 release on an x64 Windows 11 VM as a normal (unelevated) user:

  • Upgrading while 0.0.18 is running is refused at activate-installation/generation-guards with Windows error 32. The refusal and rollback are correct, but the dialog never says to close the app. Support code: MWI/installation/activate-installation/generation-guards/io-uncategorized.
  • BUILTIN\Users Modify on %LOCALAPPDATA%\Programs now reports .../validate-installation-parent/foreign-write-ace (good, that was fix(agent): report which Windows installer check failed and install in one transaction #1492's goal), but also without its advice line.

Changes

  • Dialog: the advice line sits right under "Installation stopped while …", above the report. The stage line shows the installer stage (24), and the status stays in hex. Exit codes are unchanged: the full native status for activation failures, the installer stage otherwise.
  • Advice for a file in use: "…usually because Maple Work is still running. Close Maple Work, wait a few seconds for its background host to stop, then run this installer again."
  • Support code: Windows errors 32 and 33 are now file-in-use instead of io-uncategorized.
  • Test fix (separate commit): auto_runs_clear_calls_and_the_user_decides_the_rest from feat(agent): add Read only, Auto and Full access permission modes #1490 passed touch C:\...\marker to Git Bash, which strips the backslashes, so agent-full-windows failed on it every time. It now touches a relative path in the task's project folder.

An earlier commit here added a Retry button. It is removed: a failed transaction records the installer process as its owner, and the native installer refuses a new attempt while that owner is alive, so Retry from the same process always ended in prepare-installation/installation-busy. Running the installer again from a new process resumes the transaction, which the advice now says.

Testing

  • cargo test -p maple-agent-updater with a new test for the file-in-use support code; pre-commit ci-lint and ci-test passed. CI was fully green on 71d13724, including agent-full-windows.
  • The script compiles with NSIS 3.12 (makensis -WX) from the Agent flake's pinned nixpkgs, with a stand-in config.
  • x64 VM, unelevated, with this PR's first Dev build installed over fix(agent): report which Windows installer check failed and install in one transaction #1492's running Dev build: the dialog showed the advice line, Stage: 24; status: 0x4D090020 and generation-guards/file-in-use. Pressing Retry then gave installation-busy, which is why Retry is gone. The final dialog uses the same text with only an OK button.

Not changed: the uninstaller leaves an empty install folder on purpose (see the comment in the uninstall section), and the generation guard still refuses to replace a running older version.

🤖 Generated with Claude Code

The Windows installer computes advice for each failure, such as "Close
Maple Work and retry" when a file is in use, but since the native report
was added to the dialog that advice was dropped: the report message was
rebuilt from scratch. Activation failures also printed the full status in
decimal as "Stage: 1292435488".

Seen on the signed 0.0.19 installer on x64 Windows 11, unelevated:
upgrading while 0.0.18 runs is refused at generation-guards with Windows
error 32, and the dialog gave no hint to close the app. The foreign
write ACE dialog also lost its advice.

- Keep the advice line above the native report, and show the real stage.
- Offer Retry when a file is in use or another install is active, and
  rerun the native installer from the extracted payload. Each attempt
  gets a new report path, because the child creates it exclusively.
  Silent installs and exit codes are unchanged.
- Report Windows errors 32 and 33 as file-in-use instead of
  io-uncategorized in the support code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning AnthonyRonning added ci:windows Run Windows checks on this PR ci:package Build unsigned packages on this PR labels Nov 7, 2026
AnthonyRonning and others added 2 commits November 7, 2026 16:29
auto_runs_clear_calls_and_the_user_decides_the_rest (#1490) told bash to
`touch` the marker by its absolute path. On Windows the bash tool runs Git
Bash, which reads the path's backslashes as escapes and creates a different
file, so `marker.exists()` failed every time in agent-full-windows. The
lane's earlier green runs predate #1490.

Touch it relative to the task's project folder, where bash runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retry reran the native installer from the same NSIS process. A failed
transaction records that process as its owner, and the next attempt
refuses while the owner is alive, so Retry always ended in
prepare-installation/installation-busy on the x64 test VM. Running the
installer again from a new process resumes the retained transaction, as
the 0.0.19 test showed, so the advice now says to do that.

The advice line, the stage text and the file-in-use support code stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit f106993 into master Nov 8, 2026
25 checks passed
@AnthonyRonning
AnthonyRonning deleted the claude/windows-installer-advice branch November 8, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:package Build unsigned packages on this PR ci:windows Run Windows checks on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant