title: Power buttons and lid sleep customization
body: <p>As far as I know there're only sleep/hibernate and shut-down options available in the Windows Control Panel in reaction to the power button and laptop lid closing:</p>
  
  <p><img src="https://i.stack.imgur.com/eLhc8.png" alt="enter image description here"></p>
  
  <p>I write a Windows service and I'm curious if I can customize those options? Primarily I need to be able to log out Windows user before sending the system to sleep.</p>