我可以通过 Windows 命令提示符强制提高屏幕亮度吗

我可以通过 Windows 命令提示符强制提高屏幕亮度吗

我有一台 Sony Vaio 笔记本电脑,它运行的是 Windows 7。我知道我可以从控制面板调整屏幕亮度,但我想强制将其调得更亮。有没有办法,或者有没有办法从命令提示符中执行此操作?

答案1

好的,这就是我所做的:

用于设置任何电源设置的两个命令是powercfg -SetDcValueIndexpowercfg -SetAcValueIndex,具体取决于您是否想在使用电池或交流电时更改设置。此命令的格式为(不区分大小写):

POWERCFG -SETDCVALUEINDEX <SCHEME_GUID> <SUBGROUP_GUID> <SETTING_GUID> value

然后我们需要三个 GUID。通过运行找到它们powercfg -q。输出如下所示(将以您系统的语言显示):

D:\Users\212579988>powercfg /q
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced)
  Subgroup GUID: fea3413e-7e05-4911-9a71-700331f1c294  (Settings belonging to no subgroup)
    Power Setting GUID: 0e796bdb-100d-47d6-a2d5-f7d2daa51f51  (Require a password on wakeup)
      Possible Setting Index: 000
      Possible Setting Friendly Name: No
      Possible Setting Index: 001
      Possible Setting Friendly Name: Yes
    Current AC Power Setting Index: 0x00000001
    Current DC Power Setting Index: 0x00000001

  Subgroup GUID: 0012ee47-9041-4b5d-9b77-535fba8b1442  (Hard disk)
    Power Setting GUID: 6738e2c4-e8a5-4a42-b16a-e040e769756e  (Turn off hard disk after)
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0xffffffff
      Possible Settings increment: 0x00000001
      Possible Settings units: Seconds
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

...

  Subgroup GUID: 7516b95f-f776-4464-8c53-06167f40cc99  (Display)
    Power Setting GUID: 17aaa29b-8b43-4b94-aafe-35f64daaf1ee  (Dim display after)
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0xffffffff
      Possible Settings increment: 0x00000001
      Possible Settings units: Seconds
    Current AC Power Setting Index: 0x0000012c
    Current DC Power Setting Index: 0x00000078

    Power Setting GUID: 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e  (Turn off display after)
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0xffffffff
      Possible Settings increment: 0x00000001
      Possible Settings units: Seconds
    Current AC Power Setting Index: 0x00000258
    Current DC Power Setting Index: 0x0000012c

    Power Setting GUID: aded5e82-b909-4619-9949-f5d71dac0bcb  (Display brightness)
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x00000064
    Current DC Power Setting Index: 0x0000000c

...

现在您需要找到并写下:

  • 当前方案 GUID - 它在第一行。
  • 显示的子组 GUID - 查找Display
  • 设置亮度的 GUID - 向下查找Display Brightness

现在将您的三个 GUID 值加上所需的亮度百分比 - 假设为 10% - 如下所示:

C:\Users\Mike>powercfg -SetDcValueIndex 381b4222-f694-41f0-9685-ff5bb260df2e 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb 10 

而且...对我来说什么都没发生!亮度没有改变!通过执行,powercfg /q我检查了我的新值确实被正确存储了。所以我只是要求激活我的电源设置(即使它一直处于活动状态):

C:\Users\Mike>powercfg -S 381b4222-f694-41f0-9685-ff5bb260df2e

瞧!我的屏幕亮度变暗了 10%!

答案2

我制作了一个适用于英语的批处理文件,使用上述方法。 http://aarongiera.com/change_brightness.bat

for /f "tokens=*" %%i in ('powercfg -q ^| find "Power Scheme GUID"') do set pwrSchm=%%i
set pwrSchm=%pwrSchm:~19,36%

for /f "tokens=*" %%i in ('powercfg -q ^| find "(Display)"') do set dsply=%%i
set dsply=%dsply:~15,36%

for /f "tokens=*" %%i in ('powercfg -q ^| find "(Display brightness)"') do set brtnss=%%i
set brtnss=%brtnss:~20,36%

set /P brightness=Enter % brightness:  %=%

powercfg -SetDcValueIndex %pwrSchm% %dsply% %brtnss% %brightness%
powercfg -S %pwrSchm%

它能工作,但只能在 0-100 的范围内工作。令人失望的是,它无法降低或提高 LED 的亮度。

相关内容