Some checks failed
Build SilverMetal Enhanced - Windows ISO / build (pull_request) Failing after 4m8s
The boot.wim Setup\CmdLine override (legacy-Setup forcing) is authoritative over winpeshl.ini, so it launched setup.exe directly and the collector never ran -- the VM went straight to the old sm-bootstrap unattended install. Repoint Setup\CmdLine at the collector (cmd /c X:\sm\Start-Collector.cmd); the collector still launches the legacy X:\sources\setup.exe itself. Add wpeinit + an on-screen banner, and write any collector/WinForms-load failure to X:\sm\collector-error.txt shown on the console before falling back, so we can diagnose WinForms-in-WinPE. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
1.0 KiB
Batchfile
27 lines
1.0 KiB
Batchfile
@echo off
|
|
set "SETUP=X:\sources\setup.exe"
|
|
if not exist "%SETUP%" set "SETUP=X:\setup.exe"
|
|
REM WinPE entry point (launched via Setup\CmdLine). SM_UNATTENDED=1 -> skip the UI and
|
|
REM launch Setup with the default answer file (used by CI / non-interactive builds).
|
|
if "%SM_UNATTENDED%"=="1" (
|
|
start /wait "%SETUP%" /unattend:X:\autounattend.xml
|
|
exit /b 0
|
|
)
|
|
REM Initialise WinPE (a Setup\CmdLine launch can bypass the normal startnet/wpeinit).
|
|
wpeinit
|
|
echo ============================================
|
|
echo SilverMetal pre-config collector
|
|
echo ============================================
|
|
del /f /q X:\sm\collector-error.txt 2>nul
|
|
powershell -NoProfile -ExecutionPolicy Bypass -File X:\sm\Collector.ps1
|
|
set RC=%errorlevel%
|
|
if %RC% GEQ 1 (
|
|
echo.
|
|
echo Collector exited with code %RC% -- falling back to default unattended install.
|
|
if exist X:\sm\collector-error.txt type X:\sm\collector-error.txt
|
|
echo (pausing ~25s so this is readable on the console)
|
|
ping -n 26 127.0.0.1 >nul
|
|
start /wait "%SETUP%" /unattend:X:\autounattend.xml
|
|
)
|
|
exit /b 0
|