zarquon5
Posts: 9
Joined: Mon Jan 13, 2025 4:38 pm

Non-zero exit status even though logging reports success

Hello,

When I run:

Code: Select all

"c:\program files (x86)\Caphyon\Advanced Installer 22.5\bin\x86\AdvancedInstaller.com" /build c:\programdata\BitBucket\myapp\install\myapp.aip
from the command line, I get the following, seemingly correct output:

Code: Select all

Checking builds status
Build required.


[ DefaultBuild ]
Building package: c:\programdata\BitBucket\myapp\install\Setup Files\myapp.exe
Prepare build
Detecting MSI incompatible resources
Preparing files
Creating CAB file(s)
Preparing binaries
Creating MSI database
Writing Summary Information
Creating EXE file
Validating MSI

Total build time: 47 sec.

Build finished successfully.
However, if I run this command line as a subprocess from within a script and check its return code, even though I get the same output, I discovered that I'm getting what the documentation (https://www.advancedinstaller.com/user- ... codes.html) shows as

Code: Select all

AI_ERROR_EXCEPTION (0xE0010064) - returned when an exception occurs and no other error code is specified
as a return code. Any idea why I might be getting this vs. AI_NO_ERROR (0), and how do I track down what the complaint is, since there's nothing logged that indicates what might be the problem?
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Non-zero exit status even though logging reports success

Hello,

If possible, could you please give me some more details about the script that builds your project and then captures the exit code?

I'm asking this because I have tried using PowerShell using both $process.ExitCode and $lastexitcode and I wasn't able to reproduce this.

The code looks something like this:

Code: Select all

$process = start-process -FilePath "C:\Program Files (x86)\Caphyon\Advanced Installer 22.5\bin\x86\AdvancedInstaller.com" -ArgumentList "/build C:\Users\User\Desktop\YourApplication.aip" -Wait
write-host $process.ExitCode
Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”