My Inno Setup script runs a batch script while compiling using #expr, like so:
#expr Exec("\build.bat", null, null, 1)
By design, #expr ignores the return value of the Exec() call. This silently discards any errors, which is not desirable in my case.
Can Inno Setup be made to halt compiling upon Exec() failure?
Use #if and #error directives:
#if Exec("\build.bat", null, null, 1) != 0
#error The build batch has failed
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With