Skip to content

Hide the GUI host from Windows Terminal - #112

Merged
usrname1git merged 1 commit into
mainfrom
reclaim11-public-kit
Sep 6, 2026
Merged

Hide the GUI host from Windows Terminal#112
usrname1git merged 1 commit into
mainfrom
reclaim11-public-kit

Conversation

@usrname1git

Copy link
Copy Markdown
Owner

On 25H2 the default console host is Windows Terminal. Double-click Reclaim11.cmd then start pwsh -WindowStyle Hidden opens an empty black WT window; Hidden does not apply.

  • Reclaim11.cmd hops to Reclaim11.vbs (wscript, Run 0) and exits so WT closes.
  • STA / UAC relaunch uses ShellExecute SW_HIDE instead of Start-Process -WindowStyle Hidden.
  • Kit zip and USB kit copy include the vbs.

Not CS2. Not the kernel. Test-Reclaim11 stays VM-only.

Win11 default terminal turns Reclaim11.cmd into an empty black WT
window; WindowStyle Hidden does not apply. cmd hops to Reclaim11.vbs
(Run 0) and STA/UAC relaunch uses ShellExecute SW_HIDE.
Copilot AI lite review requested due to automatic review settings September 6, 2026 09:31
@usrname1git
usrname1git merged commit 9a81c28 into main Sep 6, 2026
@usrname1git
usrname1git deleted the reclaim11-public-kit branch September 6, 2026 09:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes consistently implement the intended “no lingering Windows Terminal window” behavior and update packaging/tests accordingly.

Pull request overview

This PR updates the Reclaim11 “double-click” launch path to avoid Windows Terminal (25H2 default console host) leaving behind an empty black window when launching a hidden PowerShell UI, by hopping through a GUI host (VBS) and using SW_HIDE for STA/UAC relaunch.

Changes:

  • Add Reclaim11.vbs and update Reclaim11.cmd to launch via wscript.exe (hidden, no lingering WT window).
  • Update Reclaim11.ps1 to relaunch via ShellExecute(..., SW_HIDE) for STA/admin elevation instead of Start-Process -WindowStyle Hidden.
  • Update kit builders and VM-only tests to require the VBS to be included in USB/zip kits and enforce the new hop.
File summaries
File Description
scripts/Test-Reclaim11.ps1 Extends VM-only kit validation to require the new VBS hop and SW_HIDE relaunch behavior.
scripts/New-Reclaim11WinPeUsb.ps1 Copies Reclaim11.vbs into the USB kit payload.
scripts/New-Reclaim11KitZip.ps1 Includes Reclaim11.vbs in the staged kit zip and validates it as required input.
godbrain_core/reclaim11/Reclaim11.vbs New VBS launcher that runs the GUI PowerShell host hidden via Wscript.Shell.Run ... , 0.
godbrain_core/reclaim11/Reclaim11.cmd Updates the double-click door to hop to wscript.exe when VBS exists, exiting quickly so WT closes.
godbrain_core/reclaim11/README.md Documents that the .cmd now hops to a hidden host to avoid the WT black window behavior.
godbrain_core/reclaim11/ps1/Reclaim11.ps1 Adds Start-Reclaim11HiddenHost using Shell.Application.ShellExecute with SW_HIDE for STA/UAC relaunch.
Review details

Suppressed comments (1)

scripts/Test-Reclaim11.ps1:139

  • $launchSrc -notmatch 'ShellExecute' can be satisfied by a comment string and won’t guarantee the GUI relaunch path actually calls the COM method. Matching the call-site pattern (e.g. .ShellExecute() makes this test assertion more robust.
if ($launchSrc -notmatch 'ShellExecute') {
    throw "Test-Reclaim11: GUI path must UAC-relaunch via ShellExecute"
}
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +59 to +64
if ($cmdSrc -notmatch 'wscript\.exe') {
throw "Test-Reclaim11: Reclaim11.cmd must hop to wscript (WT swallows .cmd)"
}
if ($cmdSrc -notmatch 'Reclaim11\.vbs') {
throw "Test-Reclaim11: Reclaim11.cmd must launch Reclaim11.vbs"
}
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.

2 participants