I'm trying to prevent accidental logoff/shutdown/restart while an install is running, but cannot make this work on WinXp with Service Pack 3 Seems to me that autoit no longer recieves WM_QUERYENDSESSION messages for WinXp. Tried the same code in Windows 7 (64bit with SP1), and there we get the QUERYENDSESSION message. (even though you have to do a bit more for win7 to block shutdown, but that's beside the point) Is there any other way I can run GUIRegisterMsg to try getting those WM_QUERY