Offer official PowerShell 7 MSI on 5.1; kit v10 - #107
Conversation
GitHub win-x64/arm64 MSI via msiexec ADD_PATH. Never irm|iex or the Store stub. WinPE stays 5.1. Kit version 10.
There was a problem hiding this comment.
🟡 Changes recommended
The new MSI install/relaunch paths pass unquoted file paths to Start-Process/msiexec, which can break when the kit/MSI path contains spaces, and the MSI install should validate Authenticode signature before silent admin install.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new Reclaim11 “PowerShell 7 offer” path when the GUI is launched under Windows PowerShell 5.1, and bumps the WinPE/kit versioning to v10 across scripts, docs, and tests. This fits the Reclaim11 packaging/door flow by keeping double-click launch behavior while avoiding irm|iex and Store-stub pwsh.
Changes:
- Introduce
install_pwsh.ps1and wire the GUI to offer/install the latest official PowerShell 7 MSI (GitHub releases) on PS 5.1. - Bump kit/ISO naming from v9 → v10 and update build/packaging scripts accordingly.
- Extend
Test-Reclaim11.ps1to enforce the new pwsh-offer invariants and kit contents.
File summaries
| File | Description |
|---|---|
| scripts/Test-Reclaim11.ps1 | Adds assertions for pwsh MSI offer flow, kit contents, and v10 naming. |
| scripts/New-Reclaim11WinPeUsb.ps1 | Includes install_pwsh.ps1 in the WinPE USB kit file list. |
| scripts/New-Reclaim11WinPeIso.ps1 | Updates default ISO output name to v10 and includes install_pwsh.ps1 in copied payload. |
| scripts/New-Reclaim11KitZip.ps1 | Updates default kit zip name/version behavior for v10. |
| godbrain_core/reclaim11/winpe/offline.ps1 | Ensures offline kit copy includes install_pwsh.ps1. |
| godbrain_core/reclaim11/README.md | Updates usage docs to v10 and documents the PS 5.1 → PS7 MSI offer behavior. |
| godbrain_core/reclaim11/ps1/Reclaim11.ps1 | Dot-sources install_pwsh.ps1 and adds the PS5.1 pwsh-offer relaunch path; updates v10 ISO string. |
| godbrain_core/reclaim11/ps1/inventory.ps1 | Adds Get-Reclaim11Pwsh7 and updates Get-Reclaim11Pwsh to prefer it. |
| godbrain_core/reclaim11/ps1/install_pwsh.ps1 | New script: resolves latest MSI asset from GitHub and installs via msiexec with ADD_PATH=1, refusing WinPE. |
| godbrain_core/reclaim11/catalog.json | Bumps kit_version to 10. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| $wc.DownloadFile([string]$asset.url, $msiPath) | ||
| if (-not (Test-Path -LiteralPath $msiPath)) { | ||
| throw "Install-Reclaim11PwshMsi: download missing $msiPath" | ||
| } | ||
| $msi = Join-Path $env:SystemRoot "System32\msiexec.exe" |
| $arg = @( | ||
| "-STA", "-NoProfile", "-WindowStyle", "Hidden", "-ExecutionPolicy", "Bypass", "-File", $MyInvocation.MyCommand.Path | ||
| ) | ||
| if ($WinPeLog) { $arg += @("-WinPeLog", $WinPeLog) } | ||
| Start-Process -FilePath $pwsh7 -ArgumentList $arg -WindowStyle Hidden |
| $arg = @( | ||
| "/i", $msiPath, "/qn", | ||
| "ADD_PATH=1", "REGISTER_MANIFEST=1", "ENABLE_MU=1", "USE_MU=1" | ||
| ) |
Double-click
Reclaim11.cmdstill works without typing pwsh. If the host is Windows PowerShell 5.1, the GUI (after UAC) offers the latest stable GitHubPowerShell-*-win-x64.msi(arm64 when ARM64) viamsiexec /qn ADD_PATH=1. Neverirm|iex, never the Store stub, never WinPE.Kit version 10 (latency bake from #106 plus this door). ISO default
C:\Reclaim11\Reclaim11-WinPE-v10.iso.Test-Reclaim11.ps1green.