Detect physical power button pressing on Windows

  acpi, api, detect, windows

Is there a way in windows to detect the event of pressing the physical power button, and after detecting the event execute my file. I basically
want to run my file with arguments the computer once the power button is pressed.

Source: Windows Questions

LEAVE A COMMENT