@echo off setlocal cd /d "%~dp0" if exist "D:\Anaconda3\python.exe" ( "D:\Anaconda3\python.exe" -B main.py goto :done ) where py >nul 2>nul if not errorlevel 1 ( py -3 -B main.py goto :done ) where python >nul 2>nul if not errorlevel 1 ( python -B main.py goto :done ) echo Python 3 was not found. echo Install Python 3 and enable "Add Python to PATH", then try again. pause :done endlocal