Fix run.bat: cd to script dir, use full python path

This commit is contained in:
Lizandro Guarnizo
2026-06-17 18:34:10 -05:00
parent 6a064c2ed5
commit dc593a223e
2 changed files with 12 additions and 6 deletions
+10 -6
View File
@@ -1,5 +1,6 @@
@echo off @echo off
chcp 65001 >nul chcp 65001 >nul
cd /d "%~dp0"
:: Verificar Python :: Verificar Python
where python >nul 2>&1 where python >nul 2>&1
@@ -12,19 +13,22 @@ if %errorlevel% neq 0 (
exit /b exit /b
) )
:: Instalar dependencias :: Obtener carpeta de Python
python -m pip install -q -r requirements.txt for /f "delims=" %%i in ('where python') do set PY_DIR=%%~dpi
:: Matar instancia anterior si existe :: Instalar dependencias
taskkill /f /im python.exe 2>nul "%PY_DIR%python" -m pip install -q -r requirements.txt
:: Matar instancia anterior
taskkill /f /im pythonw.exe 2>nul taskkill /f /im pythonw.exe 2>nul
:: Iniciar sin ventana :: Iniciar sin ventana
start /b pythonw main.py start "" "%PY_DIR%pythonw" "%~dp0main.py"
echo ========================================== echo ==========================================
echo RIPS Manager iniciado en segundo plano echo RIPS Manager iniciado en segundo plano
echo http://localhost:8080 echo http://localhost:8080
echo Para detener: doble clic en stop.bat
echo ========================================== echo ==========================================
timeout /t 5 /nobreak >nul timeout /t 4 /nobreak >nul
exit exit
+2
View File
@@ -1,4 +1,6 @@
@echo off @echo off
taskkill /f /im pythonw.exe 2>nul taskkill /f /im pythonw.exe 2>nul
taskkill /f /im python.exe 2>nul
echo Servidor detenido. echo Servidor detenido.
timeout /t 2 /nobreak >nul timeout /t 2 /nobreak >nul
exit