@echo off
rem TeamBot launcher: the tray (pythonw + teambot_tray.py) starts and manages
rem teambot.exe --server. Without any Python on the machine, start the
rem self-contained exe directly (headless server).
setlocal
set "DIR=%~dp0"
for /f "delims=" %%P in ('where pythonw.exe 2^>nul') do (
  start "" "%%P" "%DIR%teambot_tray.py"
  exit /b 0
)
start "" "%DIR%teambot.exe" --server
