Inno Setup: How to abort/terminate setup during install?

Viewed 28517

During my install, I run a bat file. If the bat file returns an error, I need to abort/terminate the setup. I'd like for it to do a MsgBox telling the user what happened, then for the abort to look and act like the user pressed the Cancel button.

Is it possible to abort/terminate the setup?

Code examples would be really appreciated.

[Run]
Filename: {tmp}\test.bat; WorkingDir: {tmp}; Flags: waituntilterminated runhidden
4 Answers
Related