title: How to deny shutdown when pressing the power button for a while?
body: <p>On most newer computers you can shutdown the hard way by pressing the power button for a couple of seconds. But I want to prevent this completely.</p>
  
  <p>You're able to prevent some soft events like the sleep, suspend, hibernate and "Press power button" events in Windows control panel; you can also use some Win32 and WDI programming to catch and handle/deny those events but it doesn't seem to stop the <em>mechanical power off</em> when you hold the button for a longer time.</p>
  
  <p>I guess the power button is hard-wired to the power supply and never waits for the OS when you hold it down for some seconds? Or is there some way to prevent even this case by code?</p>
  
  <p>I'm a .NET developer.</p>
  
  <blockquote>
    <p><strong>Whooaaa...! Lots of you really argued for not doing this - "You don't
    own my computer or my OS", - "are you
    developing SkyNet" etc :) This
    application is a highly customized and
    closed solution for some customers.
    It's a kiosk application on customized
    hardware running on Windows XP
    Embedded and use a touch screen. It's
    not public.</strong></p>
  </blockquote>