views:

762

answers:

1

Hi, is there any simple way to disable processing ACPI power button events (Shutdown) temporarily using the Windows API in Visual C++, so the user isn't able to shut down the computer using the power button?

+1  A: 

In short, No.

A slightly longer explanation states that the ACPI spec has a statement (to paraphrase) "pressing and holding the power button for 4 seconds must turn the power off".

Rowland Shaw
I know and that's ok. All I want is to disable the regular shutdown procedure windows initiates when someone presses the power button.
In that case, I guess you could edit the power scheme programmatically - I'm interested in the use case for this, mind...
Rowland Shaw
Note: Some BIOSes allow you to disable the "press and hold for 4 seconds" behavior.
LiraNuna