Imaging floor: Standard/Engineer builds report progress past WinPE
The floor's 8 stages are the shopfloor pipeline, and only shopfloor-setup reports after WinPE, so every gea-standard / gea-engineer build sat at 1/8 forever with no type. - winpe-status-push.ps1 reads the image from the Z: share mapping when no PCTYPE is set and reports those builds as 5 steps. - Send-ImagingStage.ps1 (deployed to _shared\Applications\extra\pxe-status) posts steps 2-5 from the unattend: start and end of specialize, first logon, and setup complete (succeeded). It is copied to C:\ProgramData\PxeStatus first, because the bulk-enrollment task deletes C:\Deploy before first logon. Best-effort: always exits 0. - Floor rows use Standard/Engineer labels and show the image as the kind. Tested as SYSTEM in the win11 VM (PowerShell 5.1): the exact unattend command line, stages 3-5 against a test server, a dead port (exit 0), and the image regex.
This commit is contained in:
@@ -52,13 +52,26 @@ if (-not $serial) {
|
||||
exit 0
|
||||
}
|
||||
|
||||
# gea-standard / gea-engineer set no PCTYPE: read the image from the share
|
||||
# startnet mapped as Z: (\\server\winpeapps\<image>). Those builds report
|
||||
# 5 steps (WinPE, then Send-ImagingStage.ps1 from their unattend); the
|
||||
# shopfloor build reports 8.
|
||||
$total = 8
|
||||
if (-not $PCType) {
|
||||
try {
|
||||
$z = (& net use Z: 2>$null | Out-String)
|
||||
if ($z -match 'winpeapps\\(gea-standard|gea-engineer)\b') { $PCType = $Matches[1]; $total = 5 }
|
||||
} catch { Log "net use Z: exception: $_" }
|
||||
Log "image from Z: = '$PCType'"
|
||||
}
|
||||
|
||||
# Compose JSON. ConvertTo-Json works in WinPE.
|
||||
$payload = @{
|
||||
serial = $serial
|
||||
pctype = $PCType
|
||||
current_stage = $CurrentStage
|
||||
stage_index = $StageIndex
|
||||
stage_total = 8
|
||||
stage_total = $total
|
||||
status = 'in_progress'
|
||||
}
|
||||
if ($mac) { $payload.mac = $mac }
|
||||
|
||||
Reference in New Issue
Block a user