Enabling "Battery Saver" / "Energy Saver" in Windows 10 via Win32 API RRS feed

  • Question

  • Hello

    In Windows 10 in the power options the "Battery Saver" / "Energy Saver" is a new feature. This option can be enabled by the user if the user clicks on the battery icon on the taskbar and clicks the energy saver "tile".

    I also know that it is possible to find out if "Battery Saver" / "Energy Saver" is enabled if I the function GetSystemPowerStatus and check the member "SystemStatusFlag" of structure SYSTEM_POWER_STATUS to find out if battery saver is on or off.

    My question is, is there a way to enable / disable the "Battery Saver" / "Energy Saver" using a Win32 API function. I was searching, but I did not found something.

    Any ideas?

    Best regards


    Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.

    Friday, February 3, 2017 10:34 AM