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: Return value from a custom action
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
‎Aug 08, 2008
12:51 PM
Return value from a custom action
Hello,
I have InstallShield 2009. I need to run an executable in a custom action and according to the return value of the executable I need to reboot the computer or not. How can I use the exit code to trigger something else like a reboot?
Thanks
I have InstallShield 2009. I need to run an executable in a custom action and according to the return value of the executable I need to reboot the computer or not. How can I use the exit code to trigger something else like a reboot?
Thanks
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2008
01:20 PM
I haven't tried it, but perhaps conditionally set the value of the REBOOT property based on the return value?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2008
02:36 PM
The ScheduleReboot sequence allows me to set a condition for the reboot. I guess I could set a variable according to what is the return value of the executable but the problem remains, how do I set a variable based on an executable return value?
If there isn't a solution to it I have the option of creating a file from the executable and read it. Even in this case I wouldn't know how to do it.
Thanks
If there isn't a solution to it I have the option of creating a file from the executable and read it. Even in this case I wouldn't know how to do it.
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2008
03:10 PM
If an InstallScript custom action is an option, you can get an executable's return value using LaunchAppAndWait and LAAW_PARAMETERS.nLaunchResult, and then call MsiSetProperty to set the property to use in your condition; searching these forums for "LaunchAppAndWait" and "nLaunchResult" should turn up some code samples.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2008
07:56 AM
What is the executable that you need to run? If you can set it up as an MSI dll, then could you set a property before it ends that matches the return code? If so, you could use that property to determine if a reboot is required.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 18, 2008
07:46 AM
I am building an MSI package. Could I run the executable within a function from a dll and use the return value that way?
Thanks
Thanks