@echo off echo Stopping Audio Dashboard API... REM 查找占用 8002 端口的进程 for /f "tokens=5" %%a in ('netstat -ano ^| findstr :8002') do ( set PID=%%a goto :found ) :found if defined PID ( echo Found process PID: %PID% taskkill /F /PID %PID% echo Service stopped. ) else ( echo No service running on port 8002. ) pause