Starting a process blocks TCC window...

#1
Hi,

when I start an application which runs in its own window, the control returns to the prompt, as expected. Example: putty.

I wanted start several of these in a script file. But when I start the very same 'putty' command in a *.bat, *.cmd or a *.btm for that matter, the process opens window and works, but the control is not being passed further to the next command. I cannot even interrupt such a script at all, despite a "break on" command in it! Only when I close/exit that putty terminal, the control in the *.bat file advances to the next one, and so on. Of course, not a desired behavior.

How to change that and send the command into background? Is it a bug, or Windows works like that always?

I am using WinXP pro.
TCC LE 9.02.152 Windows XP [Version 5.1.2600]

Thomas
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,506
46
Albuquerque, NM
prospero.unm.edu
#2
Hi,

when I start an application which runs in its own window, the control returns to the prompt, as expected. Example: putty.

I wanted start several of these in a script file. But when I start the very same 'putty' command in a *.bat, *.cmd or a *.btm for that matter, the process opens window and works, but the control is not being passed further to the next command. I cannot even interrupt such a script at all, despite a "break on" command in it! Only when I close/exit that putty terminal, the control in the *.bat file advances to the next one, and so on. Of course, not a desired behavior.

How to change that and send the command into background? Is it a bug, or Windows works like that always?
That behavior is deliberate, for compatibility -- CMD.EXE works the same way. To start a GUI program within a batch file and then continue to the next line, use the START command.
 
D

drrob1

Guest
#3
AFAIK that is, and has always been, Windows behavior.

FWIW, linux works that way also.

ThomasH wrote:

> Hi,
>
> when I start an application which runs in its own window, the control returns to the prompt, as expected. Example: putty.
>
> I wanted start several of these in a script file. But when I start the very same 'putty' command in a *.bat, *.cmd or a *.btm for that matter, the process opens window and works, but the control is not being passed further to the next command. I cannot even interrupt such a script at all, despite a "break on" command in it! Only when I close/exit that putty terminal, the control in the *.bat file advances to the next one, and so on. Of course, not a desired behavior.
>
> How to change that and send the command into background? Is it a bug, or Windows works like that always?
>
> I am using WinXP pro.
> TCC LE 9.02.152 Windows XP [Version 5.1.2600]
>
> Thomas
>
>
>
>
>