Customers frequently ask how to disable the energy-saving technologies for a specific time frame to avoid installation interruptions. In most scenarios, the engineers solved this by setting the energy savings to high performance. Unfortunately, the next time the GPOs are applied, this modification will be reverted. A very handy solution is to use the SetThreadExecutionState function on your own.Â
SetThreadExecutionState functionÂ
This function enables an application to inform the system that it is in use, thereby preventing the system from entering sleep mode or turning off the display while the application is running.Â
For more information, please refer to https://msdn.microsoft.com/en-us/library/windows/desktop/aa373208(v=vs.85).aspx.
This function enables an application to inform the system that it is in use, thereby preventing the system from entering sleep mode or turning off the display while the application is running.Â
For more information, please refer to https://msdn.microsoft.com/en-us/library/windows/desktop/aa373208(v=vs.85).aspx.
In the following example, you can see how a Windows API is being called directly...