Skip to content

fix(install): keep the elevated command under the Windows limit - #19

Merged
helloiamnotth3devnicetomeetyou merged 3 commits into
iamallyouneed:mainfrom
Ddongddi:fix/update-compat
Oct 23, 2026
Merged

helloiamnotth3devnicetomeetyou merged 3 commits into
iamallyouneed:mainfrom
Ddongddi:fix/update-compat

Conversation

@Ddongddi

Copy link
Copy Markdown
Contributor

install.ps1 encoded the elevated script twice: the script as UTF-8 base64 inside a wrapper, then the wrapper as UTF-16 base64 for -EncodedCommand. The recent installer growth pushed that to a 37,352-character command line, past Windows' 32,767-character limit. Start-Process powershell.exe -Verb RunAs ... -EncodedCommand ... then failed with "The parameter is incorrect" before the UAC prompt, so dashboard updates from 0.10.4 to 0.10.8 could not run.

Pass the elevated script directly as -EncodedCommand (UTF-16 base64, 27,640 characters) and prepend the values the param block would have taken. The direct -Elevated path is unchanged. Extend scripts/test-legacy-update.ps1 to assert the encoded command stays under the limit and that the decoded script parses.

Verified on Windows: the patched installer updated Tacit 0.10.4 (enkoja) to 0.10.8 with en/ko/ja packs; the legacy-update test passes.

The elevated script was base64-encoded twice: UTF-8 inside a wrapper, then the wrapper as UTF-16 for -EncodedCommand. At 10,410 characters of script that produced a 37,352-character command line, past the 32,767-character Windows limit, so Start-Process failed with "The parameter is incorrect" before the UAC prompt.

Pass the elevated script directly as -EncodedCommand and prepend the values the param block would have taken. The encoded command is 27,640 characters. Extend the legacy-update test to check the limit and parse the decoded script.
Count the resolved PowerShell executable, flags and terminating NUL, and verify both editions and install/uninstall argument bindings without executing the installer. Add the missing bilingual user-facing changelog entry.

Signed-off-by: notth3dev <160973721+noth3dev@users.noreply.github.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the installer path and added regression coverage before merging. The tests now measure the complete Windows command line (including the executable, arguments, and terminating NUL), exercise both editions and install/uninstall argument combinations, and verify that the elevated installer body is preserved unchanged. Bilingual changelog entries are included.

All five CI checks pass; local Windows PowerShell 5.1 installer, rollback, default-input, and changelog checks also pass. Landing as a maintainer-signed squash while preserving contributor attribution.

@helloiamnotth3devnicetomeetyou
helloiamnotth3devnicetomeetyou merged commit 68efa71 into iamallyouneed:main Oct 23, 2026
5 checks passed
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.

3 participants