@echo off setlocal cd /d "%~dp0" echo Installing PyInstaller... py -m pip install --upgrade pip pyinstaller if errorlevel 1 ( echo Failed to install PyInstaller. exit /b 1 ) echo Building inventory_client_agent.exe... py -m PyInstaller --clean --noconfirm client_agent_windows_onefile.spec if errorlevel 1 ( echo Build failed. exit /b 1 ) echo. echo Done. echo EXE path: %~dp0dist\inventory_client_agent.exe exit /b 0