This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to save return code of a CA to a property?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 03, 2008
04:46 PM
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!
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!
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 03, 2008
04:55 PM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 03, 2008
08:26 PM
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!
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!