Question about running EXE from a batch file

N

NayJo

I am trying to gather more data about this because the information that I am
getting frankly does not make sense. So I hope that you can forgive me
posting at this early phase just so I can check my assumptions.

We are running a batch file, I assume through CMD.EXE but that is one of my
assumptions, that in turn runs a 16-Bit DOS exe using 'start /Wait
progname.exe'.

What I hear is happening is that the exe is opening in its own window and
the users are closing the command window that is running the batch file
before progname.exe is finished running.

I know that this is how 'start /Wait' is documeneted to behave for a 16-bit
executable so I asked that the person running the test change the batch file
to call progname.exe without using the start command.

But they tell me that that when they replace 'start /Wait ...' with
'progname.exe' that a new window is opened anyway for progname.exe and the
batch file continues execution and exits completely.

Any thoughts on why the exe might not be running in the same context as the
batch file? Is there a way to force the exe to run in the same context as
the batch file?



Many thanks in advance,
J
 
B

billious

NayJo said:
I am trying to gather more data about this because the information that I
am
getting frankly does not make sense. So I hope that you can forgive me
posting at this early phase just so I can check my assumptions.

We are running a batch file, I assume through CMD.EXE but that is one of
my
assumptions, that in turn runs a 16-Bit DOS exe using 'start /Wait
progname.exe'.

What I hear is happening is that the exe is opening in its own window and
the users are closing the command window that is running the batch file
before progname.exe is finished running.

I know that this is how 'start /Wait' is documeneted to behave for a
16-bit
executable so I asked that the person running the test change the batch
file
to call progname.exe without using the start command.

But they tell me that that when they replace 'start /Wait ...' with
'progname.exe' that a new window is opened anyway for progname.exe and the
batch file continues execution and exits completely.

Any thoughts on why the exe might not be running in the same context as
the
batch file? Is there a way to force the exe to run in the same context as
the batch file?



Many thanks in advance,
J

I'd suggest you try it yourself and don't rely on user-perception.

If you execute a batch

....
something.exe ...
more stuff...
....

then MORE STUFF will not be executed until SOMETHING.EXE has terminated -
but the taskbar will show a DOS instance, not SOMETHING.EXE

If you START /WAIT something.exe then there will be a DOS instance AND a
something instance on the taskbar.

Perhaps if you were to say what you WANT to happen we'd be able to be of
more help...
 
N

NayJo

billious said:
I'd suggest you try it yourself and don't rely on user-perception.

If you execute a batch

...
something.exe ...
more stuff...
...

then MORE STUFF will not be executed until SOMETHING.EXE has terminated -
but the taskbar will show a DOS instance, not SOMETHING.EXE

If you START /WAIT something.exe then there will be a DOS instance AND a
something instance on the taskbar.

Perhaps if you were to say what you WANT to happen we'd be able to be of
more help...

Thank you Billous, I am trying to get the programs that I need to see this
for myself...

I wanted to know if there were any conditions in which an Exe could open a
new command window even if the batch was written

something.exe ...
more stuff ...

(Maybe DOS Extender? Hooking the DOS or Windows Idle Interrupt? etc.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top