feat: WinPE pre-config collector + simplified first-boot toolbox (SP1) #21
Reference in New Issue
Block a user
Delete Branch "docs/winpe-preconfig-collector"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Pre-configures the install before Windows Setup runs. A branded WinPE collector captures identity + install-shaping choices, generates the answer file so Setup creates the real local-admin account natively (eliminating the
sm-bootstrapaccount + its teardown dance), and hands the rest to a simplified run-once-then-persist first-boot toolbox.Flow:
boot.wim→winpeshl.ini→ collector (PowerShell + WinForms) collects account · computer name · locale · flavour · BitLocker PIN →New-SmAnswerFilegenerates the answer file (real account, AutoLogon-once, no sm-bootstrap) + embedspreconfig.json(base64) written in thespecializepass → Setup installs + creates the account → first logon auto-applies the preconfig (apps + BitLocker, shows recovery key) → Done → persists as a launchable toolbox.What changed
windows/collector/):Test-SmInput.ps1(validation),New-SmAnswerFile.ps1(answer-file generator + embedded preconfig),Collector.ps1(dark WinForms shell),Start-Collector.cmd+winpeshl.ini(entry +SM_UNATTENDED=1CI fallback).windows/welcome/): removed the Account step, account creation,sm-bootstrapteardown, and the heavy kiosk;ApplyServiceis nowapps → bitlocker. NewPreconfigStore(load fail-open / clear-pin / configured-marker);Routespre-seeds from preconfig and first-run auto-applies (toolbox-home on subsequent launches).build.ps1): adds WinPEWinPE-NetFx/WinPE-PowerShelltoboot.wim+ stages the collector +winpeshl.ini;SetupComplete.cmdscrubs the Panther unattend (plaintext-password hygiene);Assert-IsoStructureasserts the collector baked intoboot.wim.SetupComplete(runs headless as SYSTEM); the toolbox no longer duplicates it.Spec:
windows/docs/superpowers/specs/2026-06-10-winpe-preconfig-collector-design.md· Plan:windows/docs/superpowers/plans/2026-06-10-winpe-preconfig-collector.mdBuilt subagent-driven (TDD + spec + code-quality review per task + a final whole-feature integration review that verified the collector→toolbox JSON contract round-trips and the flavour-id/run-once chain is consistent). (Branch name is historical — it started as a docs branch.)
Test Plan
dotnet test windows/welcome/SilverOS.Welcome.sln -c Release→ 31/31windows/tests/Collector.Tests.ps1) → 25/25 (validation + generator incl. base64 round-trip + no-sm-bootstrap)dotnet build windows/welcome/src/SilverOS.Welcome.App -c Release→ 0 / 0Runner prerequisite ⚠️
The CI Windows runner needs the ADK WinPE add-on (
WinPE_OCscabs) forAdd-WindowsPackageto addWinPE-NetFx/WinPE-PowerShelltoboot.wim. Without it the build warns (doesn't throw) but the collector won't be staged and theAssert-IsoStructureboot.wim assertions will fail. One-time setup on the runner.Known follow-ups (not this PR)
\sm\winpeshl.ini(System32 copy is authoritative); add the §8WinPE-NetFxpresence assertion.🤖 Generated with Claude Code