Files
inquiry_robot/deploy/Watch-Agent8910.bat
T

35 lines
929 B
Batchfile

@echo off
setlocal EnableExtensions
cd /d "%~dp0"
REM Double-click: follow remote agent 8910 logs. Ctrl+C to stop.
REM Colleague setup: see Watch-Agent8910.colleague.txt (Chinese guide also available).
REM Pass-through args, e.g. Watch-Agent8910.bat -Once
where powershell.exe >nul 2>&1
if errorlevel 1 (
echo ERROR: powershell.exe not found.
goto :end
)
if not exist "%~dp0Watch-Agent8910.ps1" (
echo ERROR: Watch-Agent8910.ps1 missing next to this bat.
goto :end
)
echo Starting LIVE follow Watch-Agent8910 ...
echo Keep this window open. New WeCom messages should appear here automatically.
echo Do NOT use Once.bat if you want realtime.
echo Local logs: repo\logs\YYYYMMDD_info.log and _error.log
echo Press Ctrl+C to stop.
echo.
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%~dp0Watch-Agent8910.ps1" %*
set ERR=%ERRORLEVEL%
echo.
echo Finished. ExitCode=%ERR%
:end
echo.
pause
exit /b %ERR%