Floor shows a staged BIOS update from the start of WinPE; NIC speed past 4.29 Gb/s

- winpe-status-push.ps1: check-bios.cmd stages the firmware update before
  the imaging menu, but startnet's 'BIOS firmware update' push only comes
  at the end of WinPE, so builds showed a plain 'Applying image' for the
  whole apply. The first push now reports the staged update when
  X:\bios-fired.flag exists, and the floor shows 'Applying image - BIOS
  update staged' (do not power off during the next reboot). Also: CIM
  fallback for the serial where wmic is missing, and standard/engineer
  always report 5 steps.
- Network pill: cdc_ncm (e.g. the WisdPI RTL8157 5G adapter) keeps link
  speed in a 32-bit bits/s field, so 5 Gb/s reads 705 Mb/s; show the real
  speed with a note.

Tested in the win11 VM (with and without the BIOS flag, and the late
startnet push).
This commit is contained in:
cproudlock
2026-10-14 16:56:46 -04:00
parent 0d69222f85
commit 454e30ff6f
4 changed files with 35 additions and 5 deletions

View File

@@ -15,7 +15,10 @@ param(
[int]$TimeoutSec = 5,
[string]$PCType = $env:PCTYPE,
[string]$CurrentStage = 'WinPE: PESetup / WIM apply',
[int]$StageIndex = 1
[int]$StageIndex = 1,
# check-bios.cmd (run before the imaging menu) writes this when it staged
# a firmware update; the flash itself happens at the reboot after WinPE.
[string]$BiosFlag = 'X:\bios-fired.flag'
)
$logFile = 'X:\Windows\Temp\winpe-status-push.log'
@@ -33,6 +36,10 @@ try {
$line = (& wmic bios get serialnumber /value 2>$null | Where-Object { $_ -match '=' } | Select-Object -First 1)
if ($line) { $serial = ($line -split '=', 2)[1].Trim() }
} catch { Log "serial wmic exception: $_" }
if (-not $serial) {
# wmic is a removable feature on newer Windows; CIM where it exists.
try { $serial = ((Get-CimInstance -ClassName Win32_BIOS -ErrorAction Stop).SerialNumber -as [string]).Trim() } catch { }
}
Log "serial=$serial"
# MAC via wmic NIC enumeration. NetEnabled filter restricts to up adapters.
@@ -64,6 +71,14 @@ if (-not $PCType) {
} catch { Log "net use Z: exception: $_" }
Log "image from Z: = '$PCType'"
}
if ($PCType -in @('gea-standard', 'gea-engineer')) { $total = 5 }
# Say so from the first push: the BIOS update was staged before the menu, but
# startnet's own "BIOS firmware update" push only comes at the end of WinPE.
if ($CurrentStage -eq 'WinPE: PESetup / WIM apply' -and (Test-Path $BiosFlag)) {
$CurrentStage = 'WinPE: PESetup / WIM apply (BIOS update staged, flashes on the next reboot)'
Log "bios flag present: $((Get-Content $BiosFlag -ErrorAction SilentlyContinue) -join ' ')"
}
# Compose JSON. ConvertTo-Json works in WinPE.
$payload = @{