BatteryMode's command-line arguments
Note: Battery Mode should be already running before executing any of commands below
BatteryMode*.exe [-Help] [-?] [/?] [-Next] [-Economy] [-Typical] [-Performance] [-GetBrightness] [-SetBrightness "<UniqueString>" [level] <Value>]
- -Help, -?, /? - Show help
- -Next - Switches to next power scheme (including custom ones)
- -Economy - Switch to «Power saver» scheme, if available
- -Typical - Switch to «Balanced» scheme, if available
- -Performance - Switch to «High performance» scheme, if available
-
-GetBrightness - Returns monitor list for which brightness control is enabled in Battery Mode.
Response format:- <N>. <Name>: "<UniqueString>"
- Levels: <Level>:<Brightness>, ..., <Level>:<Brightness>
- Current level: <CurrentLevel>
- <N> - Monitor's index (unsorted)
- <Name> - Monitor's name as shown in «Control the brightness monitors» menu
- <UniqueString> - Monitor's unique string enclosed in double-quotes
Example of external monitor: "Dell U2312HM (Digital - DVI); T=1; LI=0; PI=0".
Example of internal monitor: "DISPLAY\LGD0290\4&205f4e7&0&UID67568640_0; T=0" - <Level>:<Brightness> - Brightness levels with corresponding values.
Example: Levels: 0:0, 1:10, 2:20, 3:30, 4:40, 5:50, 6:60, 7:70, 8:80, 9:90, 10:100.
Monitors do not support brightness values between the levels, so it is recommended to use levels to set brightness
- <CurrentLevel> - Current brightness level
-
-SetBrightness - Sets brightness level for monitor, which has brightness control enabled in Battery Mode.
Syntax:- -SetBrightness "<UniqueString>" [level] <Value>
-
"<UniqueString>" - Monitor's unique string enclosed in double-quotes
It should be taken from -GetBrightness output - [level] - If defined, the value is interpreted as brightness level, otherwise as brightness value
- <Value> - Brightness level or value
Example: set internal monitor brightness to level 3
BatteryMode64.exe -SetBrightness "DISPLAY\LGD0290\4&205f4e7&0&UID67568640_0; T=0" level 3
Example: set external monitor brightness to 30%
BatteryMode64.exe -SetBrightness "Dell U2312HM (Digital - DVI); T=1; LI=0; PI=0" 30
Control Battery Mode using Pipe
Pipe address: \\.\pipe\BatteryModeCmdPipe
Access type: PIPE_ACCESS_DUPLEX
Pipe type: PIPE_TYPE_MESSAGE
One-sided exchange:
CreateFile ->
WriteFile ->
CloseHandle
Two-sided exchange:
CreateFile ->
SetNamedPipeHandleState ->
TransactNamedPipe ->
ReadFile ->
CloseHandle
Command types:
enum {
} CommandType
Genetic command syntax: <CommandType>#<CommandBody>
Header separator: "#"
-
actChangeScheme - Set power scheme.
Command syntax: actChangeScheme#Next|Economy|Typical|Performance|Custom[@:<GUID>]
Value separator: "@:"
Example: 1#Custom@:{1D088A88-A9FE-462D-AB91-1FA87949C668}
-
actSetBrightness - Set monitor brightness.
Command syntax: actSetBrightness#<UniqueString>@:Level|Brightness@:<Value>
Value separator: "@:"
Example: 2#Dell U2312HM (Digital - DVI); T=1; LI=0; PI=0@:Level@:3
-
actGetBrightnessMonitors - Request monitor list for which brightness control is enabled in Battery Mode
Command syntax: actGetBrightnessMonitors#GetBrightnessMonitors
Example: 3#GetBrightnessMonitors
-
actBrightnessMonitors - Response to actGetBrightnessMonitors. Contains a list of monitors' descriptions.
Command syntax: actBrightnessMonitors#<UniqueString>@:<Description>@:<Level>,...,<Level>@:<CurrentLevel>@;<UniqueString>...
Monitor separator: "@;"
Value separator: "@:"
Level separator: ","
Example: 4#Dell U2312HM (Digital - DVI); T=1; LI=0; PI=0@:Dell U2312HM (Digital - DVI)@:
0,1,2,3,<...>,98,99,100@:30@;
DISPLAY\LGD0290\4&205f4e7&0&UID67568640_0; T=0@:Generic PnP Monitor@:
0,10,20,30,40,50,60,70,80,90,100@:3