前言:
今天在某Q群看到有群友问谁有把笔记本电源“设置关闭盖子时不采取任何操作”的注册表,问了几次都没人回答,经过百度和测试找到以下答案。
批处理代码:
@echo off powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0 powercfg -setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
批处理说明:
参数的解释:
- -setacvalueindex:“用电池”
- -setdcvalueindex:“接通电源”
- 381b4222-f694-41f0-9685-ff5bb260df2e:“平衡”电源计划
- 4f971e89-eebd-4455-a8de-9e59040e7347:“电源按钮和盖子”
- 5ca83367-6e45-459f-a27b-476b1d01c936:“合上盖子操作”
最后的值可选:0/1/2/3
- 0:不采取任何操作
- 1:睡眠
- 2:休眠
- 3:关机
注册表代码:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\4f971e89-eebd-4455-a8de-9e59040e7347\5ca83367-6e45-459f-a27b-476b1d01c936\DefaultPowerSchemeValues\381b4222-f694-41f0-9685-ff5bb260df2e] "AcSettingIndex"=dword:00000000 "DcSettingIndex"=dword:00000000
注册表说明:
“AcSettingIndex”和”DcSettingIndex”的值可选:
- dword:00000000:不采取任何操作
- dword:00000001:睡眠
- dword:00000002:休眠
- dword:00000003:关机
适用系统:
- WIN10:已测试
- WIN11:未测试