I've been tasked with writing a Windows script that does a number of things, including preventing Windows from sleeping.
I've already tried Window's SetThreadExecutionState(EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS) to no avail. It seems that some group policy is enforcing the sleep timer. I know of others here that run a powerpoint presentation in the background to prevent the screen from sleeping but I'm looking for the more elegant (programmatic) solution here.
Another key functionality of the script is listening for input to determine an idle state, and then locking the computer upon interruption of said idle state. Therefore, I cannot just toggle the numlock occasionally or something like that.
Any insight is GREATLY appreciated.