Where are changes made by the PWRCFG.EXE command line utility stored?

5,234

Solution 1

You can use RegFromApp to capture the changes.

RegFromApp monitors the Registry changes made by the application that you selected, and creates a standard RegEdit registration file (.reg) that contains all the Registry changes made by the application. You can use the generated .reg file to import these changes with RegEdit when it's needed.

enter image description here

A different way would be the create 2 registry snapshost with RegShot 2 (1 before and 1 after the change) and let the Tool compare the snapshots and list the differences.

Solution 2

Although it's great that other answers tell which tools can be used to try to find out the answer, they don't actually answer where the information is stored.

The overrides are stored under the Process, Service, and Driver keys in

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerRequestOverride\

Each override is a DWORD named by the name of the process and with a value that is the combination of these:

  • 1 = DISPLAY
  • 2 = SYSTEM
  • 4 = AWAYMODE
  • 8 = EXECUTION

Thus the example command:

POWERCFG -REQUESTSOVERRIDE PROCESS wmplayer.exe Display System

Produces this result in the registry:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerRequestOverride\Process]
"wmplayer.exe"=dword:00000003

At time of writing this is still applicable to the latest version of Windows 10.

Solution 3

You can use Process Monitor from SysInternals to see what the pwrcfg.exe program is doing when it sets these options. Use the filtering options to only monitor pwrcfg.exe, and see where in the registry or file system it's saving the configuration options.

Share:
5,234

Related videos on Youtube

Enigma
Author by

Enigma

Updated on September 18, 2022

Comments

  • Enigma
    Enigma over 1 year

    Specifically in regards to the below part of another answer, is there somewhere I can manually set/edit what this utility is doing?

    Powercfg Command-Line Options

    In the command line you can type

    POWERCFG -REQUESTSOVERRIDE PROCESS name_of_the_process
    

    Display System and this will prevent Windows 7 to go to sleep while a certain process is running. I never used it so you must read the manual here.

    Usage:

    POWERCFG -REQUESTSOVERRIDE <CALLER_TYPE> <NAME> <REQUEST>
    

    Specifies one of the following caller type: PROCESS, SERVICE, DRIVER. This is obtained by calling the POWERCFG -REQUESTS command. Specifies the caller name. This is the name returned from calling POWERCFG -REQUESTS command. Specifies one or more of the following Power. Request Types: Display, System, Awaymode.

    Example:

    POWERCFG -REQUESTSOVERRIDE PROCESS wmplayer.exe Display System
    

    To remove the power request override, use the -REQUESTSOVERRIDE option, but do not specify any type of override (System, Display, AwayMode) as in the following example:

    POWERCFG -REQUESTSOVERRIDE PROCESS wmplayer.exe