feat: .bat con ventanas inteligentes (persistente en error, autocierre en exito)
This commit is contained in:
+12
-2
@@ -1,4 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
chcp 65001 >nul
|
chcp 65001 >nul
|
||||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\start-server.ps1" %*
|
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\doctor.ps1" %*
|
||||||
exit /b %errorlevel%
|
set EC=%errorlevel%
|
||||||
|
if not "%EC%"=="0" (
|
||||||
|
echo.
|
||||||
|
echo [!] Algo fallo. Esta ventana queda abierta para que puedas leerlo.
|
||||||
|
echo Si llamas a alguien por ayuda, enviale una captura de pantalla.
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
) else (
|
||||||
|
timeout /t 5 /nobreak >nul
|
||||||
|
)
|
||||||
|
exit /b %EC%
|
||||||
|
|||||||
+8
-1
@@ -1,4 +1,11 @@
|
|||||||
@echo off
|
@echo off
|
||||||
chcp 65001 >nul
|
chcp 65001 >nul
|
||||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\stop-server.ps1" %*
|
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\stop-server.ps1" %*
|
||||||
exit /b %errorlevel%
|
set EC=%errorlevel%
|
||||||
|
if not "%EC%"=="0" (
|
||||||
|
echo.
|
||||||
|
echo [!] Algo fallo al apagar. Esta ventana queda abierta.
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
exit /b %EC%
|
||||||
|
|||||||
Reference in New Issue
Block a user