@echo off
REM ===  6.0 Power Stroke OBD reader launcher  ===
REM  Double-click this on Windows. It installs pyserial (once) then runs.

where python >nul 2>nul
if errorlevel 1 (
  echo Python is not installed or not on PATH.
  echo Install it from https://www.python.org/downloads/  ^(check "Add Python to PATH"^),
  echo then double-click this file again.
  pause
  exit /b 1
)

echo Ensuring pyserial is installed...
python -m pip install --quiet pyserial

echo.
echo Starting OBD reader. Turn the truck key to RUN ^(engine off is fine^).
echo If it can't find the port, pass it like:  RUN_OBD.bat COM5
echo.
python "%~dp0obd_reader.py" %*
echo.
pause
