用bat档完成一下需求:将power options里面的change when the computer sleeps的使计算机进入睡眠选项和关闭显示器选项全部改成never;还有Set Power and sleep buttons and lid setting all to Do nothing and select Don’t require a password请示列代码
@echo off echo Changing power options... powercfg -change -monitor-timeout-ac 0 powercfg -change -monitor-timeout-dc 0 powercfg -change -standby-timeout-ac 0 powercfg -change -standby-timeout-dc 0 powercfg -change -hibernate-timeout-ac 0 powercfg -change -hibernate-timeout-dc 0 powercfg -SETACVALUEINDEX SCHEME_CURRENT SUB_BUTTONS BUTTONLIDACTION 0 powercfg -SETDCVALUEINDEX SCHEME_CURRENT SUB_BUTTONS BUTTONLIDACTION 0 powercfg -SETACVALUEINDEX SCHEME_CURRENT SUB_BUTTONS BUTTONSLEEP 0 powercfg -SETDCVALUEINDEX SCHEME_CURRENT SUB_BUTTONS BUTTONSLEEP 0 powercfg -SETACVALUEINDEX SCHEME_CURRENT SUB_BUTTONS BUTTONPOWER 0 powercfg -SETDCVALUEINDEX SCHEME_CURRENT SUB_BUTTONS BUTTONPOWER 0 echo Power options changed successfully
原文地址: http://www.cveoy.top/t/topic/d4cx 著作权归作者所有。请勿转载和采集!