manoj_kumar_ins
Pilgrim

How to get the batch file status still running or completed the .bat file execution

HI All,

I am executing the .bat file from the "LaunchAppAndWait" API. How to get the batch file status still running or completed the .bat file execution.
How to get the status using install Script. If any one knows Please help me.

Or how to wait installation application up to complete of the .bat file.

Thanks and Regards,
Manoj Kumar Unnam
Labels (1)
0 Kudos
4 Replies
rrinblue22
Pilgrim

"LAAW_OPTION_WAIT" will actually wait for the completion of the launched process.
And if you are looking for the return code from the launched application you can check for nLaunchResult.
0 Kudos
manoj_kumar_ins
Pilgrim

Hi rrinblue22,

Thanks for your reply. I am using the API as,

LaunchAppAndWait (batch_filename, "", LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN);

application is not waiting up to complete of the batrch_filename file execution.

this will provide only the "batch_filename" is launched successfully or not.

I want to wait the install shield application up to completion of the "bathc_filename" file execution.

Thanks and Regards,
Manoj Kumar Unnam
0 Kudos
rrinblue22
Pilgrim

Ideally the parameter supplied here will make Installer wait for the completion of the launched process which is batch file in your case.

How did you determine that the installer is not waiting for completion?

Try this, which should help you display the launched batch file.

LaunchAppAndWait (batch_filename, "", LAAW_OPTION_WAIT);


Also if this is in an InstallScript Custom Action, please make sure your custom action is set to "Synchronous (check exit code)" in the "Return Processing" setting.
0 Kudos
manoj_kumar_ins
Pilgrim

Thanks,

This is not a custom action. This project is a install script executable project. Writing the once function with in the function i placed this condition.


If this project is a Basic MSI Project. Then we will create a custom action then will provide the "Returning process" value as "Synchronous (Check exit code)".


Thanks and Regards,
Manoj Kumar Unnam
0 Kudos