Sat3CheenD89at
Posts: 1
Joined: Wed Apr 28, 2021 10:43 pm

Pre-Req return codes

Thu Apr 29, 2021 12:22 am

I'm building my own pre-req - to do weird but necessary things during the pre-install phase, during both silent (/qn) and normal installs.

I'm wondering how Advanced Installer handles the return codes from a pre-req (I don't see anything documented about this). Does it react to the values that are returned? I do set the code in a property, which can be read down-stream, once the pre-req phase ends.

There are situations where I want the installation to abort, and it would be great if AI's pre-req manager could do this, but I don't know if it's capable, what to tell it, or: whether I need to handle this downstream, testing the property set by the pre-req.

thanks for your help

Catalin
Posts: 4081
Joined: Wed Jun 13, 2018 7:49 am

Re: Pre-Req return codes

Thu Apr 29, 2021 2:34 pm

Hello and welcome to our forums,

First of all, please note that this is not something custom that we do in Advanced Installer regarding the return codes.

The Windows Installer process (msiexec) will interpret as failure every return code that is not "0". For more information about this, please have a look over the following articles from Microsoft:

MsiExec.exe and InstMsi.exe Error Messages (for Developers)

and

Windows Installer Error Messages (for Developers)

Regarding the return code of your prerequisite, you can save it in a property by using the "Save return value in this property" field from "Prerequisites" page --> "Setup Files" tab.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”