@echo off REM Portable: uses Windows py launcher if present, falls back to python on PATH. REM Stderr redirected to log file so it can't pollute stdout (native messaging is binary). setlocal set "PYBIN=python" where py >nul 2>&1 && set "PYBIN=py" if not exist "%~dp0logs" mkdir "%~dp0logs" "%PYBIN%" -u "%~dp0rcjav-host.py" 2>>"%~dp0logs\rcjav-host-stderr.log"