Change Power & Sleep Setting Programmatically
Mujahid Desai
41
Reputation points
I want to update Power & Sleep Setting Programmatically
I have tried PowerWritePossibleValue API (ref: nf-powrprof-powerwritepossiblevalue) but there is no proper documentation or sample available.
**Is there any way to update the power and sleep setting programmatically? Through .Net/C++ **
Windows development Windows API - Win32
2,782 questions
Accepted answer
1 additional answer
Sort by: Most helpful
-
Xiaopo Yang - MSFT 12,731 Reputation points Microsoft External Staff
2021-11-24T06:56:55.183+00:00 According to the Answer which supplies multiple solutions, The easiest way would be to use the Powercfg utility. WMI ,Power Management Functions and Registry also work.