@echo off
setlocal ENABLEDELAYEDEXPANSION

REM --- PowerShell で BaseBoard Product を取得 ---
for /f "usebackq tokens=* delims=" %%A in (`powershell -NoLogo -NoProfile -Command ^
    "(Get-CimInstance Win32_BaseBoard).Product"`) do (
    set "BB_PRODUCT=%%A"
)

echo BaseBoard Product: "%BB_PRODUCT%"

REM --- 先頭4文字を抽出 ---
set "BB_PREFIX=%BB_PRODUCT:~0,4%"

REM --- 判定 ---
if /I "%BB_PREFIX%"=="LGBA" (
    echo → LGBQP181.exe を実行します
    %~dp0LGBQP181.exe
    goto :EOF
)

if /I "%BB_PREFIX%"=="LGFA" (
    echo → LGFQP281.exe を実行します
    %~dp0LGFQP281.exe
    goto :EOF
)

echo 対象外の製品です: "%BB_PRODUCT%"
pause
endlocal
