Right click an empty space on your desktop
Click "properties" (this will take you into the display properties)
Click the Screensaver tab
Click the Power tab
Click the Advanced tab
you will see where it says "when i press the power button on my computer"
you then select the setting you want (shutdown, standby, hibernate or do nothing)
if you set it to shutdown , Windows will shut down your computer safely after pressing the power button just once.