fix(collector): carry preconfig via chunked FirstLogonCommands (specialize Path too long) #24
Reference in New Issue
Block a user
Delete Branch "fix/answer-file-specialize-length"
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?
Symptom (real install, VM 102)
The collector form worked, generated the answer file, and launched Setup — which got through image apply, then failed at the specialize pass: "Windows could not parse or process unattend answer file … for pass [specialize]. The answer file is invalid."
Root cause
New-SmAnswerFileembedded the whole base64preconfig.jsonin a singlespecializeRunSynchronousCommand/<Path>(~300+ chars). The unattendPathis capped (~259 chars), so Setup rejected the file at the specialize pass. (windowsPE + oobeSystem parsed fine — only specialize re-validates that component.)Fix
specializepass entirely.preconfig.jsonthrough the provenoobeSystemFirstLogonCommandsinstead, writing the base64 in ≤150-char chunks (echo-append → decode with whitespace-strip → cleanup), before the toolbox-launch command (FirstLogonCommands run synchronously inOrder, so preconfig exists before the toolbox reads it).Test Plan
flavour=developer,pin=246810; assert no specialize pass; dir+decode present)<CommandLine>= 207 chars🤖 Generated with Claude Code