diff --git a/playbook/startnet.cmd b/playbook/startnet.cmd index f53304c..b4fe181 100644 --- a/playbook/startnet.cmd +++ b/playbook/startnet.cmd @@ -261,12 +261,18 @@ REM dashboard friendly-label swaps to "Updating BIOS firmware". The "->" REM marker is what check-bios writes for both "updated" and "STAGED" REM cases. No-op states ("up to date", "no update in catalog", "Skipped", REM "missing") never contain the arrow and stay on the default label. -echo %BIOS_STATUS% | findstr /C:"->" >NUL -if not errorlevel 1 ( +REM +REM CAUTION: cannot use `echo %BIOS_STATUS% | findstr /C:"->"` - the `>` +REM inside the value gets parsed as a redirect operator before the pipe, +REM breaking the pipeline. Use substring-replace trick: if removing "->" +REM from BIOS_STATUS yields a different string, the arrow was present. +call set "BIOS_STATUS_STRIPPED=%%BIOS_STATUS:->=%%" +if not "%BIOS_STATUS%"=="%BIOS_STATUS_STRIPPED%" ( if exist "Y:\scripts\winpe-status-push.ps1" ( - powershell -NoProfile -ExecutionPolicy Bypass -File "Y:\scripts\winpe-status-push.ps1" -CurrentStage "WinPE: BIOS firmware update - %BIOS_STATUS%" + powershell -NoProfile -ExecutionPolicy Bypass -File "Y:\scripts\winpe-status-push.ps1" -CurrentStage "WinPE: BIOS firmware update" ) ) +set "BIOS_STATUS_STRIPPED=" echo Waiting for PESetup.exe to start... :wait_start