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.