fix(first-boot): branding-online encoding crash + bootstrap cleanup + recovery QR #15
Reference in New Issue
Block a user
Delete Branch "fix/branding-encoding-cleanup-qr"
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?
Root-caused by mounting the unencrypted VM disk after run #7 (BitLocker hadn't encrypted, so C: was readable) and reading the first-boot logs.
1. Lock/login/wallpaper branding still missing — online re-apply was crashing.
Apply-Branding.ps1had a UTF-8 em-dash inside aWrite-Warningstring. Windows PowerShell 5.1 (whatSetupCompleteuses) reads.ps1as ANSI, mangled the bytes, broke the string terminator → the whole script failed to parse → branding never re-applied online (thefirstboot.logshowed the parser error). Fix: ASCII-ify it and save the branding scripts UTF-8-with-BOM so PS 5.1 always decodes them correctly (verified parses under PS 5.1 and PS 7).2.
sm-bootstrapnever removed.TearDownAsynccreated the deferred-cleanup task withschtasks /tr+ an inline-EncodedCommand, which silently fails past the ~261-char/trlimit — the task was never created (NO_TASKon disk). Fix:Register-ScheduledTask(no length limit).3. Recovery key UX. Done step now shows a QR code of the recovery key (QRCoder, pure-managed) for phone backup, laid out side-by-side with the key text so the Restart button no longer overflows below the fold. Notes the local copy is deletable after backup.
Verified: welcome solution builds, 29/29 tests; branding Pester 6/6 unit (offline-integration runs in CI as SYSTEM).
Still open (next round, mostly VM environment):
Secure Boot configuration does not meet requirements. The-SkipHardwareTestremoval correctly turned the silent recovery-drop into an honest failure; the VM just needs Secure Boot enabled/enrolled (OVMF). On real hardware Secure Boot is on. (Product gap to consider: verify Secure Boot before enrolling so the wizard doesn't report success while C: stays unencrypted.)E1G6032E.sysblocked = HVCI/Memory Integrity refusing the old Intel e1000 driver (working as designed). VM should use a HVCI-compatible NIC (virtio + injected drivers); real hardware needs HVCI-compatible drivers.🤖 Generated with Claude Code