From 0340fb224f64c0c41daa8530149051268929e4a1 Mon Sep 17 00:00:00 2001 From: yubaolee Date: Fri, 12 Jun 2026 00:25:27 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A0=EF=B8=8Ffeat:=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=BC=BA=E5=88=B6=E9=80=80=E5=87=BA=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E7=9A=84=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CheckAndKillPort52789.bat | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 CheckAndKillPort52789.bat diff --git a/CheckAndKillPort52789.bat b/CheckAndKillPort52789.bat new file mode 100644 index 00000000..42185439 --- /dev/null +++ b/CheckAndKillPort52789.bat @@ -0,0 +1,25 @@ +@echo off +chcp 936 +setlocal enabledelayedexpansion +echo 正在检查52789端口占用情况... + +rem 查找占用52789端口的进程 +FOR /F "tokens=5" %%i IN ('netstat -ano ^| findstr :52789 ^| findstr LISTENING') DO ( + SET pid=%%i + echo 发现占用52789端口的进程,PID: %%i + echo 正在查询进程信息... + tasklist | findstr %%i + + echo 正在结束进程 %%i... + taskkill /F /PID %%i + + echo 验证端口是否已释放... + netstat -ano | findstr :52789 + goto :END +) + +echo 未发现占用52789端口的进程。 + +:END +echo 操作完成。 +pause \ No newline at end of file