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
chcp 65001 >nul
cd /d "%~dp0"
:: Verificar Python
where python >nul 2>&1
@@ -12,19 +13,22 @@ if %errorlevel% neq 0 (
exit /b
)
:: Instalar dependencias
python -m pip install -q -r requirements.txt
:: Obtener carpeta de Python
for /f "delims=" %%i in ('where python') do set PY_DIR=%%~dpi
:: Matar instancia anterior si existe
taskkill /f /im python.exe 2>nul
:: Instalar dependencias
"%PY_DIR%python" -m pip install -q -r requirements.txt
:: Matar instancia anterior
taskkill /f /im pythonw.exe 2>nul
:: Iniciar sin ventana
start /b pythonw main.py
start "" "%PY_DIR%pythonw" "%~dp0main.py"
echo ==========================================
echo RIPS Manager iniciado en segundo plano
echo http://localhost:8080
echo Para detener: doble clic en stop.bat
echo ==========================================
timeout /t 5 /nobreak >nul
timeout /t 4 /nobreak >nul
exit
+2
View File
@@ -1,4 +1,6 @@
@echo off
taskkill /f /im pythonw.exe 2>nul
taskkill /f /im python.exe 2>nul
echo Servidor detenido.
timeout /t 2 /nobreak >nul
exit