@echo off chcp 65001 >nul title subtitle-studio 停止 setlocal REM ===== 停止 subtitle-studio 服务 ===== set PORT=8788 echo 查找端口 %PORT% 上的进程... for /f "tokens=5" %%p in ('netstat -ano ^| findstr ":%PORT%" ^| findstr "LISTENING"') do ( echo 停止 PID %%p taskkill /f /pid %%p >nul 2>&1 ) timeout /t 1 /nobreak >nul netstat -ano | findstr ":%PORT%" | findstr "LISTENING" >nul 2>&1 if %errorlevel%==0 ( echo ⚠️ 端口仍被占用,可能需要手动结束 ) else ( echo ✅ subtitle-studio 已停止 ) pause