@echo off echo Checking for Python... where python >nul 2>&1 if %errorlevel% equ 0 goto done where python3 >nul 2>&1 if %errorlevel% equ 0 goto done echo Python not found, downloading... set PYTHON_ZIP=%TEMP%\py.zip powershell -Command "Invoke-WebRequest -Uri 'https://www.python.org/ftp/python/3.11.8/python-3.11.8-embed-amd64.zip' -OutFile '%PYTHON_ZIP%'" echo Extracting Python... if not exist "%~dp0tools" mkdir "%~dp0tools" powershell -Command "Expand-Archive -Path '%PYTHON_ZIP%' -DestinationPath '%~dp0tools\python' -Force" echo lib> "%~dp0tools\python\python311._pth" echo libs>> "%~dp0tools\python\python311._pth" echo .>> "%~dp0tools\python\python311._pth" echo Scripts>> "%~dp0tools\python\python311._pth" powershell -Command "Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile '%~dp0tools\python\get-pip.py'" "%~dp0tools\python\python.exe" "%~dp0tools\python\get-pip.py" "%~dp0tools\python\Scripts\pip.exe" install flask flask-cors psutil echo Python installed. :done echo. echo Installation complete! echo Run: start.bat echo. set /p RUN=Launch now? (Y/n): if /i "%RUN%"=="" set RUN=y if /i "%RUN%"=="y" start.bat