aavanzi
Posts: 2
Joined: Wed Nov 28, 2012 6:06 pm

How to set a property using the return value of an exe?

Hi,

I would like to retrieve in my installers the return value of an external exe file launched by a custom action. Is this possible, and if yes, how?

The idea is to display a custom dialog only if an external exe returns a specific value. Am I doing it the right way or are there more interesting options?

Thanks for your help,
Alberto
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to set a property using the return value of an exe?

Hi and welcome to Advanced Installer forum.

Unfortunately you can't retrieve the return value of an exe custom action. The return code of a custom action is captured by Windows Installer, not Advanced Installer.

The only way to communicate between external code and the installer is through properties.
You can set a property by generating a dll instead of exe and then use this property as a condition for your custom dialog to be displayed. Here you can find an example of what you must do.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aavanzi
Posts: 2
Joined: Wed Nov 28, 2012 6:06 pm

Re: How to set a property using the return value of an exe?

Ok, thank you very much, I'll go this way.

A.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to set a property using the return value of an exe?

You're welcome. Glad to help you.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”