修复批处理文件中的引号解析错误

- 修复 'tatus' 和 '[Q]' 命令未识别错误
- 使用 %~2 去除参数中的引号
- 简化菜单选项显示格式(A/S/Q不使用方括号)
This commit is contained in:
KQL
2025-09-24 14:43:36 +08:00
parent 616a2c6c4a
commit 641142039b

View File

@@ -30,9 +30,9 @@ echo [10] Chemical Industry / 化工产业 (Port: 5159)
echo [11] Energy Industry / 能源产业 (Port: 5160)
echo [12] Environmental / 环保产业 (Port: 5161)
echo --------------
echo [A] Stop All / 停止所有
echo [S] Status / 查看状态
echo [Q] Exit / 退出
echo A - Stop All / 停止所有
echo S - Status / 查看状态
echo Q - Exit / 退出
echo.
set /p choice="Enter your choice / 请输入选项: "
@@ -140,7 +140,7 @@ goto MAIN_MENU
:START_INDUSTRY
set dir=%1
set name=%2
set name=%~2
set port=%3
echo.
@@ -245,7 +245,7 @@ goto MAIN_MENU
:CHECK_PORT
set port=%1
set name=%2
set name=%~2
netstat -an | findstr ":%port%" >nul 2>&1
if %errorlevel%==0 (
echo [RUNNING] %name% - Port: %port%