Not sure if this is a bug or not, but I thought that I'd report it.
; doesn't set error flag when 'X' is used to close EULA.exe
Push $0
ClearErrors
ExecWait 'EULA.exe' $0
${If} ${Errors}
MessageBox MB_OK "Error"
${EndIf}
Pop $0
; sets error flag when 'X' is used to close EULA.exe
ClearErrors
ExecWait 'EULA.exe'
${If} ${Errors}
MessageBox MB_OK "Error"
${EndIf}