From b80c176a250671679e6db030960a5587f13255a0 Mon Sep 17 00:00:00 2001 From: USER Date: Sun, 22 Jan 2023 20:49:50 +0000 Subject: [PATCH] . --- baseShutdown.bat | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/baseShutdown.bat b/baseShutdown.bat index eb05dd1..623cf50 100644 --- a/baseShutdown.bat +++ b/baseShutdown.bat @@ -3,14 +3,24 @@ call C:\Scripts\wBase\baseENV.bat @REM xxxxxxx echo "%~n0: Start" +set STOPFILE="C:\Scripts\STOPFILE.txt" +set SHUTDOWN=1 + if "%check_computername%" EQU "SERVER" ( set SHUTDOWN=0 ) +if exist %STOPFILE% ( + echo "Shutdown being overriden" + call %TMESSAGE% '"%check_computername% shutdown overriden"' + SHUTDOWN=0 +) + if [%SHUTDOWN%] == [0] ( echo "Not shutting down" ) else ( - echo "shutting down" - call %TMESSAGE% '"%check_computername% shutting down"' - C:\Windows\System32\shutdown.exe /s /t 1 + echo "shutting down" + call %TMESSAGE% '"%check_computername% shutting down"' + C:\Windows\System32\shutdown.exe /s /t 1 ) +