Setting windows to 'do nothing' when the power button is pressed will not help.
The hardware setting will power down the PC after abut 5 seconds, then up, then down...
Here is the diagram to build the circuit. I made this exactly and it works 100% on my laptop.
The capacitor allows the coil of the relay to be energized until the capacitor stores a charge, thus de-energizing the coil. The resistor bleeds off the charge of the capacitor when positive voltage is removed from the other side of the coil. You can increase the output time by simply changing the value of the capacitor. This one will give you about a 1/2 second output.
Connecting to laptop switch will require you to open it up and locate the switch contacts.
Use your multimeter to find which 2 pins on the switch have continuity when the switch is pressed. These are the 2 you need to connect to.
Use the lines from point 87 and 30 on the relay.