fix(welcome): eject optical install media before BitLocker enrollment #5
Reference in New Issue
Block a user
Delete Branch "feat/welcome-app"
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
Follow-up to #4. A second live VM e2e (after #4 merged) found that BitLocker TPM+PIN enrollment fails while the install ISO is still attached:
This is exactly the kind of failure the new exit-code checking (already merged in #4) now surfaces — the wizard showed a clear "Configuration failed … (exit 1)" with Retry instead of silently degrading to TPM-only. This PR completes the BitLocker TPM+PIN enforcement by ejecting optical install media before enrollment.
BitLockerServicenow runs a best-effort optical-media eject (Shell.ApplicationEject verb on CD/DVD drives) at the start of the enrollment script, before the FVE policy +Enable-BitLocker/Add-BitLockerKeyProtector+ TPM-only-protector cleanup + outcome check.Test Plan
dotnet test— 26 green (incl. asserting the eject command is emitted).Known follow-ups (noted, not in this PR)
New-LocalUseridempotent so Retry is clean.🤖 Generated with Claude Code