cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jofolch
Level 2

How to save return code of a CA to a property?

Hello,

how can I save the return code of an EXE which is called from a Custom Action?
I would use this property later as a condition for another Custom Action.

Thanks!
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

I'm not aware of anything built in to MSI for this; your CA might need to call CreateProcess (or an InstallScript action would call LaunchAppAndWait or the like) and then call MsiSetProperty to store the return value in a property that can be used in later conditions.
0 Kudos
jofolch
Level 2

Thanks!
I used LaunchAppAndWait function, then catch the EXE return code with LAAW_PARAMETERS.nLaunchResult and finally set the property value with MsiSetProperty function, and it works!
0 Kudos