Code: @echo off :: ###################################################################################################################### :: # Title : Add Or Remove "Allow System Required Policy" From Power Options # :: # Created By: Paul Black at TenForums.com/members/paul-black.html # :: # Created In: November 2020 # :: # Tutorial : https://www.tenforums.com/tutorials/108447-add-allow-system-required-policy-power-options-windows.html # :: ###################################################################################################################### title Add Or Remove "Allow System Required Policy" - Written by Paul Black. mode con: cols=80 lines=25 & color 17 set "params=%*" cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs") && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /b) %windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || ( echo. & echo ERROR: This Batch file MUST be run in an ELEVATED cmd prompt [ Administrator ] & echo. & echo Right-click the Batch file and click ^<Run as administrator^>. & echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & goto :Exit ) :Options echo. & echo ============================================================================== echo Add Or Remove "Allow System Required Policy" From Power Options. echo ============================================================================== echo. & echo Options: echo. & echo [0] EXIT this Program. echo. & echo [1] Add "Allow System Required Policy" From Power Options. echo [2] Remove "Allow System Required Policy" From Power Options [ Default ]. echo. & echo ============================================================================== echo. CHOICE /N /C 012 /M ">Enter an Option:" if %errorlevel%==3 goto Remove_System_Required_Policy if %errorlevel%==2 goto Add_System_Required_Policy if %errorlevel%==1 goto Exit goto :Options :Add_System_Required_Policy powercfg -attributes SUB_SLEEP A4B195F5-8225-47D8-8012-9D41369786E2 -ATTRIB_HIDE :Remove_System_Required_Policy powercfg -attributes SUB_SLEEP A4B195F5-8225-47D8-8012-9D41369786E2 +ATTRIB_HIDE echo. & echo Processing COMPLETE. echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & goto :Exit :Exit |