Need help: custom action in dialog with return code 0 or 1 - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

HHOOSE
Posts: 2
Joined: Thu Sep 27, 2007 1:03 pm

Need help: custom action in dialog with return code 0 or 1

Hello,

I have an executable file with returncodes 0 and 1. It returns 0 when everything is ok else 1.

I use this exe in a custom action.

I added a button in a new dialog with a published event DoAction viewer.exe.

The executabe file runs fine but I don't know how to get the returncodes.
I want to set a global property with a value containing the returncode 0 or 1.

I need help!

Thx!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Windows Installer does not support this. Please give more details about what you are trying to do so we can see if there is an alternative.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
HHOOSE
Posts: 2
Joined: Thu Sep 27, 2007 1:03 pm

Hi Cosmin,

in a dialog you can enter a tcp-port. This port I want to check with my exe and as parameter

the tcp-port property.

If the exe returns 0 I want to allow to go to another dialog.
If it returns 1 I want to deny to continue the installation.

Did I misunderstood the Advanced Installer Help?
"Custom actions that are executable files must return a value of 0 for success. The

installer interprets any other return value as failure."

Thank you for your help!

Regards,

Holger
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

The return code of a custom action cannot be verified by the user, it is used only internally by Windows Installer. As an alternative you can create a custom action dll which will assign the return code of the .exe to a property which you can later use.

We have an example of a dll custom action, please take a look:
http://www.advancedinstaller.com/user-g ... n-dll.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”