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: detecting exit code
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
‎Feb 05, 2008
07:57 AM
detecting exit code
I was trying to detect errors with some customized programs called in the InstallScript of my INstallScriptMSI project. In my "testError.exe" program, I flagged the exitcode to 1 or 0 respectively when encountered errors.
I use the following IS function:
nResult = LaunchAppAndWait(SUPPORTDIR ^ "testError.exe", "", WAIT);
But I soon found out that this function always return 0 no matter what was returned by testError.exe. And apparently all [FONT="Courier New"]LaunchApp() [/FONT]related functions would do the same.
So, is there a way to retrieve the exit value of testError.exe with a InstallScript function, or any other way?
I use the following IS function:
nResult = LaunchAppAndWait(SUPPORTDIR ^ "testError.exe", "", WAIT);
But I soon found out that this function always return 0 no matter what was returned by testError.exe. And apparently all [FONT="Courier New"]LaunchApp() [/FONT]related functions would do the same.
So, is there a way to retrieve the exit value of testError.exe with a InstallScript function, or any other way?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2008
08:12 AM
The return value of LaunchAppAndWait (or LaunchApplication) indicates only that the application was launched successfully.
To retrieve the return value of the launched application evaluate:
LAAW_PARAMETERS.nLaunchResult
(if LAAW_OPTION_WAIT option was specified)
To retrieve the return value of the launched application evaluate:
LAAW_PARAMETERS.nLaunchResult
(if LAAW_OPTION_WAIT option was specified)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2008
10:17 AM
That worked out just fine.
Thanks!
Thanks!
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)