0

I want to link the power button press on my PC with the script that I want to run. I would want my script to shutdown the PC without any notification to the user of any unsaved data. Only the msgbox should pop up with a message "Do you want to shut down" with 2 options ok and cancel.

I know it has something to do with the ACPI event but I am new to this ACPI.

How do I write such script? How do I link it with the power button press? Please help me.

phuclv
  • 26,555
  • 15
  • 113
  • 235
k11
  • 1
  • 1
  • [Can I schedule a task when I hit power button on windows 8.1 tablet](https://superuser.com/q/1069859/241386), [Run a program on: hard “Power” button press](https://stackoverflow.com/q/48285507/995714), [How can I intercept the push of the physical power button in Windows?](https://stackoverflow.com/q/14593834/995714) – phuclv Jun 20 '18 at 12:44
  • possible duplicate of [How to detect the event of the power button being pressed](https://superuser.com/q/1095392/241386) – phuclv Jun 20 '18 at 12:44

0 Answers0