@echo off setlocal echo. echo ============================================ echo WAOUW - PREP SD (firstboot, non-interactif) echo ============================================ echo. set "PS1=%~dp0prep-sd-auto.ps1" if not exist "%PS1%" ( echo [FATAL] introuvable: %PS1% exit /b 9 ) REM Si powershell n'est pas dans le PATH, on sort proprement where powershell.exe >nul 2>&1 || ( echo [FATAL] powershell.exe introuvable exit /b 10 ) REM Débloque et lance le script PowerShell powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Unblock-File -Path '%PS1%'" >nul 2>&1 powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%PS1%" %* set "RC=%ERRORLEVEL%" echo. echo [EXITCODE] %RC% exit /b %RC%