From 63140e94e852e34b15788289f5e75f662d91832c Mon Sep 17 00:00:00 2001 From: USER Date: Fri, 21 Apr 2023 17:52:31 +0100 Subject: [PATCH] . --- baseReboot.bat | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 baseReboot.bat diff --git a/baseReboot.bat b/baseReboot.bat new file mode 100644 index 0000000..38ce1fa --- /dev/null +++ b/baseReboot.bat @@ -0,0 +1,27 @@ +@echo off +call C:\Scripts\wBase\baseENV.bat +@REM xxxxxxx +echo "%~n0: Start" + +set STOPFILE=C:\Scripts\STOP +set SHUTDOWN=1 + +@REM if "%check_computername%" EQU "SERVER" ( +@REM set SHUTDOWN=0 +@REM mkdir %STOPFILE% +@REM ) + +if exist %STOPFILE% ( + echo "Reboot being overriden" + call %TMESSAGE% '"%check_computername% reboot overriden"' + set SHUTDOWN=0 +) + +if [%SHUTDOWN%] == [0] ( + echo "Not shutting down" +) else ( + echo "shutting down" + call %TMESSAGE% '"%check_computername% rebooting"' + C:\Windows\System32\shutdown.exe /r /t 30 +) +