@echo off rem =========================================================================== rem RIOJoy cockpit post-install entry point (run by TeslaConsole). rem Sits beside the 'RIOJoy' payload folder; elevates, then runs rem RIOJoy\install-rio.ps1. rem =========================================================================== setlocal title RIOJoy post-install rem --- elevate if we are not already administrator -------------------------- net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting administrator privileges... powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs" exit /b 0 ) cd /d "%~dp0" powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0RIOJoy\install-rio.ps1" set RC=%errorlevel% echo. if %RC% neq 0 ( echo postinstall FAILED with exit code %RC%. ) else ( echo postinstall completed. ) exit /b %RC%