grchen168
Posts: 3
Joined: Wed Sep 09, 2020 8:01 pm

Prerequisites's Pre-install - how to unconditionally execute...

Hello,
I have a custom exe file that I put it under the Pre-install package section of Prerequisites.
(I have attached screenshot for it)
(Note: I kept the "Continue with main installation even if the Prerequisite is not installed" unchecked)

(The exe (a .NET console application ) just simply do some files cleanup.)
How should I program the custom exe's return value (ex: 0 for success, others for fail ?) to instruct AdvancdInstaller to continue the setup or not??
(Note: the exe is just fire & run, no installation required)
Attachments
screen-shot.jpg
screen-shot.jpg (58.89 KiB) Viewed 2825 times
Catalin
Posts: 6583
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisites's Pre-install - how to unconditionally execute...

Hello and welcome to our forums,

I am not quite sure I understand your question here.

Depending on the return code of the EXE, your setup will either fail or succeed if the "Continue with main installation even if the prerequisite is not installed" option is unchecked.

Hope this helps. If not, please give me some more details about what you want to achieve so I can further assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
grchen168
Posts: 3
Joined: Wed Sep 09, 2020 8:01 pm

Re: Prerequisites's Pre-install - how to unconditionally execute...

Thanks for the reply.
My problem is : in my EXE, what return value (0 or 1 or other specific value) should I use to indicate success for AdvancedInstaller?
Catalin
Posts: 6583
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisites's Pre-install - how to unconditionally execute...

Hello,

Thank you for your followup on this.

It is clear for me now what the question was about.

Your EXE should return 0. Anything besides 0 will be considered an error.

You can find more information about this in the "MsiExec.exe and InstMsi.exe Error Messages (for Developers)" article.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
grchen168
Posts: 3
Joined: Wed Sep 09, 2020 8:01 pm

Re: Prerequisites's Pre-install - how to unconditionally execute...

That's what I want to know,
Thank you very much.
Catalin
Posts: 6583
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisites's Pre-install - how to unconditionally execute...

You are always welcome!

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

Return to “Building Installers”