fix(collector): launch via Setup\CmdLine (collector was bypassed into Setup) #23

Merged
SilverLABS merged 1 commits from fix/collector-launch-via-setup-cmdline into main 2026-06-10 09:14:20 +00:00
Owner

Symptom (found on VM 102)

First boot of the collector ISO went straight to "Installing Windows" — the collector form never appeared, and Setup ran the static fallback autounattend.xml (the old sm-bootstrap flow).

Root cause

build.ps1's legacy-Setup fix sets HKLM\SYSTEM\Setup\CmdLine = setup.exe /unattend in boot.wim. That Setup\CmdLine override is authoritative over winpeshl.ini, so WinPE launched setup.exe directly and the staged collector was never reached.

Fix

  • Repoint Setup\CmdLine at the collector: cmd /c X:\sm\Start-Collector.cmd. The collector generates the answer file and launches the legacy X:\sources\setup.exe itself (preserving the legacy-Setup bypass), or falls back to the default autounattend.xml on cancel/error.
  • Start-Collector.cmd: run wpeinit (a Setup\CmdLine launch can skip the normal startnet/wpeinit), show an on-screen banner, and on failure type the error + pause ~25 s before falling back.
  • Collector.ps1: on any exception (e.g. WinForms can't load in WinPE) write X:\sm\collector-error.txt + Write-Host it, so the wrapper surfaces it on the console.

This both fixes the launch and instruments the next boot so we can confirm WinForms runs in WinPE (the one thing we couldn't test until the collector actually launches).

Test Plan

  • build.ps1 + Collector.ps1 parse clean; collector scripts ASCII-only
  • VM boot: collector banner/form appears in WinPE (not straight to Setup); on completion → install with the generated answer file (real account, no sm-bootstrap)

🤖 Generated with Claude Code

## Symptom (found on VM 102) First boot of the collector ISO went **straight to "Installing Windows"** — the collector form never appeared, and Setup ran the static fallback `autounattend.xml` (the old `sm-bootstrap` flow). ## Root cause `build.ps1`'s legacy-Setup fix sets `HKLM\SYSTEM\Setup\CmdLine = setup.exe /unattend` in `boot.wim`. **That `Setup\CmdLine` override is authoritative over `winpeshl.ini`**, so WinPE launched `setup.exe` directly and the staged collector was never reached. ## Fix - Repoint `Setup\CmdLine` at the collector: `cmd /c X:\sm\Start-Collector.cmd`. The collector generates the answer file and launches the **legacy** `X:\sources\setup.exe` itself (preserving the legacy-Setup bypass), or falls back to the default `autounattend.xml` on cancel/error. - `Start-Collector.cmd`: run `wpeinit` (a `Setup\CmdLine` launch can skip the normal startnet/wpeinit), show an on-screen banner, and on failure `type` the error + pause ~25 s before falling back. - `Collector.ps1`: on any exception (e.g. WinForms can't load in WinPE) write `X:\sm\collector-error.txt` + `Write-Host` it, so the wrapper surfaces it on the console. This both fixes the launch **and** instruments the next boot so we can confirm WinForms runs in WinPE (the one thing we couldn't test until the collector actually launches). ## Test Plan - [x] `build.ps1` + `Collector.ps1` parse clean; collector scripts ASCII-only - [ ] VM boot: collector banner/form appears in WinPE (not straight to Setup); on completion → install with the generated answer file (real account, no sm-bootstrap) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
SilverLABS added 1 commit 2026-06-10 09:14:09 +00:00
fix(collector): launch via Setup\CmdLine (was bypassed) + WinPE diagnostics
Some checks failed
Build SilverMetal Enhanced - Windows ISO / build (pull_request) Failing after 4m8s
fce4b77bd6
The boot.wim Setup\CmdLine override (legacy-Setup forcing) is authoritative over
winpeshl.ini, so it launched setup.exe directly and the collector never ran -- the
VM went straight to the old sm-bootstrap unattended install. Repoint Setup\CmdLine
at the collector (cmd /c X:\sm\Start-Collector.cmd); the collector still launches the
legacy X:\sources\setup.exe itself. Add wpeinit + an on-screen banner, and write any
collector/WinForms-load failure to X:\sm\collector-error.txt shown on the console
before falling back, so we can diagnose WinForms-in-WinPE.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SilverLABS merged commit 731ae88adf into main 2026-06-10 09:14:20 +00:00
SilverLABS deleted branch fix/collector-launch-via-setup-cmdline 2026-06-10 09:14:20 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SilverLABS/SilverMetal#23