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
- :
- How Do I Get Result From Bat File in CA?
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 17, 2014
09:02 PM
How Do I Get Result From Bat File in CA?
Suppose I execute a bat file from a CA in a Basic MSI project.
Either by executing the Bat file as a CA or by executing it from an InstallScript CA.
How do I access the exit code returned (EXIT /B -1... for example) by the bat file?
Looks to me like the result for LaunchApp or LaunchAppAndWait is only the result for launching.
Thanks!
Either by executing the Bat file as a CA or by executing it from an InstallScript CA.
How do I access the exit code returned (EXIT /B -1... for example) by the bat file?
Looks to me like the result for LaunchApp or LaunchAppAndWait is only the result for launching.
Thanks!
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 18, 2014
12:06 PM
Figured it out by researching the help and postings on this site and others.
LAAW_PARAMETERS.nLaunchResult has the result in the InstallScript... but to set it you need to do this in the bat file... assuming some decisions have been made, the desired return code is in %Ret%, and you jump to :LastLine. Putting this code somewhere else does not work (as was discovered by others).
REM Below required to be last line to pass exit code back to IS
:LastLine
%COMSPEC% /C EXIT %Ret% >nul
http://stackoverflow.com/questions/4632891/exiting-batch-with-exit-b-x-where-x-1-acts-as-if-command-completed-successfully
LAAW_PARAMETERS.nLaunchResult has the result in the InstallScript... but to set it you need to do this in the bat file... assuming some decisions have been made, the desired return code is in %Ret%, and you jump to :LastLine. Putting this code somewhere else does not work (as was discovered by others).
REM Below required to be last line to pass exit code back to IS
:LastLine
%COMSPEC% /C EXIT %Ret% >nul
http://stackoverflow.com/questions/4632891/exiting-batch-with-exit-b-x-where-x-1-acts-as-if-command-completed-successfully
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)