cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Darain
Level 6

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?
Labels (1)
0 Kudos
(2) Replies
Holger_G
Level 10

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)
0 Kudos
Darain
Level 6

That worked out just fine.
Thanks!
0 Kudos