cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
thekalki
Level 4

run a .bat file with LaunchAppAndWait

Hi All,

I need some help on running a batch file.

I am executing a batch file with LaunchAppAndWait . All the commands in the batch file gets executed properly, however on test machines it just runs all the commands not even waiting for the previous command to be finished.

For example
Copy aa\*.* bb\
rmdir /s /q aa

In the above commands first copy needs to be completed and then rmdir needs to be invoked. However the prompt is not waiting for the previous command to be executed properly on test machines.

Also I am providing WAIT option also.
Please help me..
Labels (1)
0 Kudos
(2) Replies
Not applicable

I am not sure why Launchappandwait is not waiting. It worked fine for all my cases, and the CMDs should execute one after one!
if one or two CMDs, we can dirctly run from installscript. We don’t have to use the batch file.

The example is below;
LaunchAppAndwait (SystemFolder^"cmd.exe","/c copy aa\*.* bb\ ",WAIT);
LaunchAppAndwait (SystemFolder^"cmd.exe","/c rmdir /s /q aa",WAIT);
0 Kudos
thekalki
Level 4

Thanks for your reply.

My batch file does a little bit extra than the examples which i showed.

I have to unzip the zip files with a jar command

cd zippath
jar xf zipfile1.zip
jar xf zipfile2.zip
java -umf manifestfile xx.jar
copy these files to installpath

So for this purpose i am running a batch file. but other than my machine Windows XP , on all other machines they just run the commands so fast without completing the previous command.
0 Kudos