Erci.Triodor
Posts: 4
Joined: Fri Sep 25, 2009 11:29 am

Return code of console application

Hello,

We have developed a console application returns 0 if successful and 2 if fails in .net platform.

We have added this console application as a custom action in Advanced Installer. We need if the custom action checks the return code of this console application(HardwareControl.exe) to continue to the setup process. The custom action runs as we expect, but it ignores the return code of this console application.

We need some help about this topic. We are trying to stop the installation if the return code is different from 0.

Regards,
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Return code of console application

Hello,

I am afraid the Windows Installer does not check for the return codes of executables. You will have to use either a VBScript or a DLL custom action.
MSDN lists the return values that must be returned by a DLL custom action.
You can find a sample custom action dll implemented in C in our comprehensive guide.

For a VBScript custom action, these are the return values that must be returned by your VBScript custom action. Use the values listed in the third column of that table.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”