Page 1 of 1

miabuild.exe does not catch script errors

Posted: Fri Jan 12, 2007 8:05 am
by Christoph Schneegans
Consider a blank project with this minimal script:

Code: Select all

  end
  Terminate Installation


As expected, when I try to compile the project via Shift+F9, I receive an error message: "Too many END statements".

However, when I build the project from the command line, miabuild.exe does not output any error messages, but says that the "Build completed successfully". It even creates an .exe and .msi in the "Release" folder. When I double-click the .msi, the installation fails, which is not very surprising: "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2728."

What's going wrong here? Why doesn't miabuild.exe catch the script error in the first place?

Posted: Fri Jan 12, 2007 8:45 am
by jimo
Are you checking the return code from miabuild.exe?

Posted: Fri Jan 12, 2007 9:45 am
by Christoph Schneegans

Code: Select all

U:\\>"C:\\Programme\\InstallAware\\InstallAware 6\\miabuild.exe" "D:\\Christoph Schneegans\\InstallAware\\Projekte\\ScriptError\\ScriptError.mpr"

InstallAware
Command Line Build Utility

Building Project: ScriptError
Output Folder: D:\\Christoph Schneegans\\InstallAware\\Projekte\\ScriptError\\Release\\Uncompressed\Deployment Type: Uncompressed Directory Layout
Code Signing: Disabled
Compression: Default
###
Cleared output folder D:\\Christoph Schneegans\\InstallAware\\Projekte\\ScriptError\\Release\\Uncompressed\Created Windows Installer database
Built installation executable
Injected setup languages
Injected runtime files

Build completed successfully

U:\\>echo %errorlevel%
0

Posted: Fri Jan 12, 2007 2:46 pm
by MichaelNesmith
This is a known issue - miabuild will not warn about scripting errors. Apologies for the inconvenience - always test the scripts in the IDE before building with miabuild.