I have some simple code, but exits oddly with "!>07:43:31 AutoIt3.exe ended.rc:-1" before ">Exit code: -1    Time: 2.645" _Exit() Func _Exit() Exit MsgBox(4096, '', 'Exit', 2) EndFunc ;==>_Exit If the timeout is removed then it exits as expected.