Skip to content

fix: print the manual elevated-PowerShell command instead of staging a .cmd - #246

Merged
quickbeard merged 7 commits into
mainfrom
fix/windows-manual-elevated-flow
Aug 5, 2026
Merged

fix: print the manual elevated-PowerShell command instead of staging a .cmd#246
quickbeard merged 7 commits into
mainfrom
fix/windows-manual-elevated-flow

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Summary

Field escalation of the Kaspersky saga: the self-elevating Install-CoDev-Office.cmd from #244/#245 is also blocked — the AV quarantines the .ps1 when the .cmd launches it. The launch matrix is now fully mapped:

Launch Result
codevhub (node) spawns powershell process killed mid-install
staged .cmd → powershell .ps1 quarantined
user types the command in an elevated PowerShell runs to "Verification passed" (proven repeatedly)

So the Windows flow now stages everything and prints the exact working procedure instead of trying to automate the launch:

  1. Open an elevated PowerShell (Ctrl+Shift+Enter, with the use-a-different-account UAC guidance inline).
  2. Copy-paste two lines: cd "<staging dir>" and powershell -ExecutionPolicy Bypass -File .\codev-office-windows-setup.ps1 … — with the profile-safe -ModulesDir/-SkillsRoot paths from feat: stage the Windows office install in %PUBLIC% and bake real-user paths #245 baked into the printed command (quoted where they contain spaces), so an elevation under a different admin account still installs to the real user's profile.
  3. Wait for the green Verification passed.

The wrapper generators are removed (officeManualWindowsCommand replaces them); %PUBLIC%\Downloads\codev-office staging, legacy migration, and the ACL fallback from #245 are unchanged. The uninstall flow prints the equivalent command.

Deployment order (unchanged from #245): the codev-scripts#22 scripts must be published before this release — the printed command passes -ModulesDir/-SkillsRoot.

Test plan

  • pnpm typecheck, pnpm check, download/office suite: 36 passed
  • Windows staging (both cross-platform and win32-host) asserts: no spawn, no .cmd written; the manual-command builder is unit-tested for flags, baked paths, and space-quoting
  • Field: codevhub skill office on the KES machine → copy-paste the two printed lines into an elevated PowerShell → "Verification passed", skills in the real user's profile

🤖 Generated with Claude Code

Quickbeard and others added 7 commits August 5, 2026 19:19
Field result: endpoint protection also quarantines the .ps1 when the
self-elevating Install-CoDev-Office.cmd launches it. The only launch
mode it tolerates - proven repeatedly - is the user typing the command
in an elevated PowerShell themselves.

The Windows flow now downloads everything and prints exactly that:
open an elevated PowerShell (with the use-a-different-account UAC
guidance), then copy-paste two lines - cd into the staging folder and
the powershell -ExecutionPolicy Bypass -File command with the
profile-safe -ModulesDir/-SkillsRoot paths baked in, quoted where they
contain spaces. No wrapper file, no Explorer window, no spawn.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
officeWrapperBakedArgs -> officeBakedPathArgs, comments reworded to
describe the launch constraint without the retired staged-launcher
history, and the .cmd-absence test assertions dropped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d path

Companion to codev-scripts#23: %PUBLIC%\codev-office\node_modules is
the script's own default, so the printed command carries only
-SkillsRoot (the one per-machine value). Cross-platform staging now
bakes nothing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Companion to codev-scripts#23: the setup script resolves the signed-in
user's skills root itself when elevated as a different account, and the
modules dir default is the shared %PUBLIC% path. Nothing per-machine
remains to bake, so the printed command is the same bare line the docs
show - one command everywhere.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Nothing is baked into the printed command any more - the setup script
itself defaults to the shared %PUBLIC% dirs and detects the console
user.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quickbeard
quickbeard merged commit edce853 into main Aug 5, 2026
2 of 4 checks passed
@quickbeard
quickbeard deleted the fix/windows-manual-elevated-flow branch August 5, 2026 15:20
quickbeard pushed a commit that referenced this pull request Aug 6, 2026
`codevhub skill office` ships four skills — minimax-docx, minimax-xlsx,
pptx-generator and minimax-pdf — but `codevhub help` and the README both
advertised only DOCX and XLSX, so users had no way to learn that PPTX and
PDF authoring were installed too. `src/lib/office.ts` already documented
all four; only the user-facing copy was stale.

Pin the list with a help test so it can't drift from the bundle again.

Two adjacent README claims in the same section were stale against the
code and are corrected here as well:

- Bundle sizes (610 MB / 820 MB / 1.4 GB) contradicted APPROX_BUNDLE_MB.
  Rather than restate numbers the README has to track, point at the
  heads-up runSkillOffice already prints from that constant.
- The download path and Windows behavior: officeDownloadsDir() returns
  %PUBLIC%\Downloads\codev-office on Windows, and since #244#246
  codevhub deliberately prints the elevated-PowerShell command instead
  of launching the installer.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
quickbeard added a commit that referenced this pull request Aug 6, 2026
* docs: name all four office formats in help and README

`codevhub skill office` ships four skills — minimax-docx, minimax-xlsx,
pptx-generator and minimax-pdf — but `codevhub help` and the README both
advertised only DOCX and XLSX, so users had no way to learn that PPTX and
PDF authoring were installed too. `src/lib/office.ts` already documented
all four; only the user-facing copy was stale.

Pin the list with a help test so it can't drift from the bundle again.

Two adjacent README claims in the same section were stale against the
code and are corrected here as well:

- Bundle sizes (610 MB / 820 MB / 1.4 GB) contradicted APPROX_BUNDLE_MB.
  Rather than restate numbers the README has to track, point at the
  heads-up runSkillOffice already prints from that constant.
- The download path and Windows behavior: officeDownloadsDir() returns
  %PUBLIC%\Downloads\codev-office on Windows, and since #244#246
  codevhub deliberately prints the elevated-PowerShell command instead
  of launching the installer.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: say what the office skills do, not "authoring"

"Authoring" dates to #233, when the bundle was DOCX-only. It reads as
write-only, and all four skills also read and edit existing files:
minimax-xlsx is "open, create, read, analyze, edit, or validate";
pptx-generator "generate, edit, and read"; minimax-pdf has FILL and
REFORMAT modes alongside CREATE. Name the verbs instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Quickbeard <quickbeard@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.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