Hi Tim,

On Sun, 16 Mar 2003 20:20:53 -0500 Tim Musson wrote:

>> You can use one line for this:
>>
>> start /w "C:\Program Files\The Bat!\thebat.exe" /EXIT

> Thanks Januk, but I am guessing 'start' works differently in the
> different MS OS's (surprise, surprise...). I had to use the following
> syntax, but I still got the output of the echo before the TB window was
> gone...

> ,----- [  ]
> | start "Close TB" /wait "C:\Program Files\The Bat!\thebat.exe" /EXIT
> |
> | echo. Is TB Closed?
> `-----

And what if you ommit the "start" in this particular case?
I mean 

"C:\Program Files\The Bat!\thebat.exe" /EXIT

should only return when the exit was sent to the proc...ess ... *geee* I
see!!! this second instance you're starting (if there already is a
thebat.exe process running) recognizes the first one, sends it an 'exit'
signal and terminates itself immediately, while the first instance is
still shutting down and e.g. compressing or whatever needs to be done
... *hmmm*

I guess you're out of luck on Windows, unless you find a program that
allows you to check on command line or via return code the existance of
a process, like 'ps' does.
Than you could write a small loop that waits until termination has taken
effect.

But don't ask me for such a tool :-) Every time I was in the need for
"controling my OS" I took Linux *eg* :-)))
-- 
Ciao,
 Pit

________________________________________________________
 Current version is 1.61 | "Using TBTECH" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to