From 1d39a9b00b5c66565514d6df2743ec1606b5bf83 Mon Sep 17 00:00:00 2001 From: scarrington Date: Fri, 13 Dec 2024 11:15:40 -0600 Subject: [PATCH] Disabled Sleep for script --- TCSE-Computer-Deploy.bat | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TCSE-Computer-Deploy.bat b/TCSE-Computer-Deploy.bat index 3dddc68..748cd6f 100644 --- a/TCSE-Computer-Deploy.bat +++ b/TCSE-Computer-Deploy.bat @@ -1,5 +1,8 @@ @echo off +:: Set PowerOptions so the PC will not go to sleep during the script +Powercfg /x -standby-timeout-ac 0 + :: Install Office 2016 echo Installing Office 2016... C:\Scripts\Software\Office2016\setup.exe /adminfile C:\Scripts\Software\Office2016\TCSE.MSP @@ -81,6 +84,9 @@ echo Successfully Copied Login Scripts... :: Perform Windows Updates powershell -ExecutionPolicy Bypass -File "C:\Scripts\Patches\Windows\Initial-Windows-Updates.ps1" +:: Set PowerOptions so the PC will sleep after 60 minutes +Powercfg /x -standby-timeout-ac 60 + :: Restart System echo Restarting system in 2.5 minutes... timeout /t 150