Re: Problem when executing application from batch file



It appears that outside a batch file, i.e., in Command Prompt, the app is
started and you are returned to the "C:\" prompt immediately. In a batch
file it waits for the App to finish before going to the next line, so
checking for previous instance is not necessary. If you are at Command
Prompt and wanted to type the EXE name and wait till the program finishes,
use:

start /wait yourapp /para1 /para2...




"DanS" <t.h.i.s.n.t.h.a.t@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:Xns96E5DB32A2E19idispcom@xxxxxxxxxxxxxxxxx
> "Jack" <replyto@newsgroup> wrote in
> news:evhDSZUyFHA.464@xxxxxxxxxxxxxxxxxxxx:
>
>> I do not understand and maybe someone please can explain to why, after
>> executing the first line of the batch file the batch execution stops
>> until I close my application.
>> What kind of mechanism is that?
>> sample of batch file:
>> [].exe /5553331234
>> [].exe /5556770808
>> [].exe /5553451234
>>
>> That happens only if there is not previous instance running.
>> I can see batch execution in CMD window. I can see the first batch
>> line being executed and then nothing. I close my app and then second
>> line of batch file appears and my app is alive again. I close my app
>> and then the third line of batch file will appear.
>> If I understand the mechanism of that behaviour maybe I can patch over
>> that problem
>> Jack
>>
>
> Is that 3 seperate lines in the batch file ?
>
> In the OP, I thought by accept multiple command line params I thought you
> meant like: program.exe /param1 /param2 /param3
>
> The batch file acts exactly as it was intended. It runs the first line,
> waits until that program ends, then runs the next line.
>
> I would have written the command$ handler to parse the string and look for
> multiple params, which is what I thought you did, and you wouldn't have
> had
> this issue.
>
> Regards,
>
> DanS
>


.



Relevant Pages

  • Re: Application starts too soon
    ... Windows XPE site and looked thru the two XPE books and found nothing on this ... >> The application runs froma a batch file. ... >> The batch file has my exe followed by a Shutdown command ... >> think the app tries to run, encounters an error, and exits. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Problem when executing application from batch file
    ... >buffer and execute one by one ... >that the comands (multi-commands from batch file) are sent. ... >multi-commands, then the first command will invoke the application and the ... If you write a tiny stripped down loader for your App and use: ...
    (microsoft.public.vb.general.discussion)
  • Re: Problem when executing application from batch file
    ... To force the batch file to not wait for your app and return immediately, ... > is a single command from command prompt or it is part of batch file ... >> It appears that outside a batch file, i.e., in Command Prompt, the app is ...
    (microsoft.public.vb.general.discussion)
  • Running FTP Batch file on server
    ... I want to download hourly definitions from the Symantec ftp site using a ... The batch file fails and if at the command ... prompt I type open ftp.symantec.com I just get an error: ...
    (microsoft.public.windows.server.sbs)
  • RE: Setting env and path variables
    ... If you set up a batch file, with the commands below and run it in a command ... prompt under winXP it should work. ... Subject: Re: Setting env and path variables ...
    (comp.os.msdos.djgpp)