Skip to content

fix: rename downloaded binary to avoid Windows UAC installer-detection#58

Open
kenhia wants to merge 1 commit into
All-The-Vibes:mainfrom
kenhia:fix/windows-uac-installer-detection
Open

fix: rename downloaded binary to avoid Windows UAC installer-detection#58
kenhia wants to merge 1 commit into
All-The-Vibes:mainfrom
kenhia:fix/windows-uac-installer-detection

Conversation

@kenhia

@kenhia kenhia commented Jun 9, 2026

Copy link
Copy Markdown

Problem

On Windows, npx atv-starterkit@latest init (and --guided) does nothing and exits with code 1 and no output.

Root cause

The npm package downloads a Go binary named atv-installer.exe and runs it via execFileSync in npm/bin/cli.js. Windows UAC has an installer-detection heuristic that automatically flags any executable whose filename contains install (also setup, update, patch) as an installer requiring administrator elevation. Launched non-elevated, Windows refuses to start it:

The requested operation requires elevation

cli.js catches the thrown error and does process.exit(err.status || 1) without re-printing the message, so the user just sees a silent exit 1.

Proof

Running the downloaded binary directly returns The requested operation requires elevation. Copying the exact same bytes to a name without install (e.g. atv-tool.exe) runs perfectly with no elevation. Only the filename differs.

Fix

Rename the downloaded binary atv-installeratv-inst-tool (verified locally to not trigger the heuristic):

  • .goreleaser.ymlproject_name + builds[].binary
  • npm/install.jsBINARY_NAME
  • npm/bin/cli.jsBINARY_NAME
  • .gitignore, npm/.gitignore — ignore the new artifact name
  • npm/README.md — doc reference

Testing

  • go build + ran the full npm wrapper (node npm/bin/cli.js init) end-to-end on Windows → scaffolded all files, exit 0, no elevation error.
  • go test ./... passes except a pre-existing TestDogfoodPromptParity failure that also fails on clean main (unrelated to this change).

Note for maintainers

install.js fetches the latest release and downloads <BINARY_NAME>_<ver>_<os>_<arch>. This change must ship together with a new GitHub release built from the updated goreleaser config, so the published archive name matches the new atv-inst-tool name.

The npm package downloads a Go binary named `atv-installer.exe`. Windows
UAC `installer detection` heuristically flags any executable whose filename
contains `install` (also setup/update/patch) as requiring administrator
elevation. Launched non-elevated via `execFileSync` in cli.js, Windows
refuses to start it (`The requested operation requires elevation`); the
wrapper swallows the error and exits 1 with no output, so `npx
atv-starterkit init` appears to do nothing.

Rename the release binary to `atv-inst-tool` (verified not to trigger the
heuristic) across goreleaser config and the npm download/run wrapper.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant