@echo off
setlocal
title Remote Access - Agent
echo ============================================
echo   Remote Access Agent
echo ============================================
echo.
set "DEF_URL=http://localhost:8090"
set /p SERVER_URL=Server URL [%DEF_URL%]: 
if "%SERVER_URL%"=="" set SERVER_URL=%DEF_URL%
echo.
set /p AGENT_ENROLL_TOKEN=Paste the enroll token from the console: 
if "%AGENT_ENROLL_TOKEN%"=="" ( echo [X] No token entered. & pause & exit /b 1 )
echo.
echo Connecting to %SERVER_URL% ...
cd /d "%~dp0agent"
call npm start
pause
