修复服务管理

This commit is contained in:
2026-07-30 12:36:22 +08:00
parent 0014d07174
commit c04b3b6b5d

View File

@@ -27,14 +27,18 @@ if not exist "%NSSM_EXE%" (
) )
REM 检查虚拟环境 REM 检查虚拟环境
set "PYTHON_PATH="
if exist ".venv\Scripts\python.exe" ( if exist ".venv\Scripts\python.exe" (
set PYTHON_PATH=%cd%\.venv\Scripts\python.exe set "PYTHON_PATH=%cd%\.venv\Scripts\python.exe"
) else ( ) else (
for /f "delims=" %%i in ('where python') do ( for /f "delims=" %%i in ('where python 2^>nul') do (
set PYTHON_PATH=%%i if not defined PYTHON_PATH set "PYTHON_PATH=%%i"
goto :found_python )
if not defined PYTHON_PATH (
echo [错误] 未找到 Python请先安装 Python 或创建虚拟环境
pause
exit /b 1
) )
:found_python
) )
echo ======================================== echo ========================================