title: How to abort shutdown in Windows Vista and 7 programatically?
body: <p>In the second example (in the section examples) on this <a href="http://www.autohotkey.com/docs/commands/OnMessage.htm" rel="nofollow noreferrer">link</a>, there is a description on using WM_QUERYENDSESSION to abort a shutdown. It also states that this does not work on versions of windows later than XP. This is conflicting with the advice given on another <a href="https://stackoverflow.com/questions/589986/how-to-abort-shutdown-in-windows-xpvista-programatically">question</a> here at stackoverflow. What is the correct answer? I do not have a computer with either so I am unable to test.</p>