View preventShutdow.au3
;RUNGUI() ; Remove ';' from first line , so script GUI will open
Func RUNGUI()
$WM_QUERYENDSESSION2 = 0x11
GUIRegisterMsg($WM_QUERYENDSESSION2, "Cancel_Shutdown")
$Hwnd = GUICreate("PreventShutdownGUI")
GUISetSTate(@SW_SHOW)
MsgBox(262144,'','Hello kitty')