织梦CMS - 轻松建站从此开始!

欧博ABG官网-欧博官方网址-会员登入

欧博abgAdd Allow system required policy to Power Opt

时间:2025-08-30 12:01来源: 作者:admin 点击: 8 次
How to Add or Remove


Hello @Brink,

Here is an additional batch script option . . .

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


(责任编辑:)
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:
发布者资料
查看详细资料 发送留言 加为好友 用户等级: 注册时间:2025-09-01 02:09 最后登录:2025-09-01 02:09
栏目列表
推荐内容