exit codes for running programs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi;
I posted a message here wanting to know how to shutdown the computer after
and only after I had exited a certain program. That program is MY Theater(MT)
, a satellite prgrams viewer. I had put both MT and the shutdown command in a
batch file in the startup folder, but the batch file commands were executed
sequentially without waiting for me to exit MT.

My question is: is there some type of exit code condition I coule check to
let me know that MT has exited? Then and only then is when I want to run the
shutdown command.

thanks
 
canoad said:
Hi;
I posted a message here wanting to know how to shutdown the computer after
and only after I had exited a certain program. That program is MY Theater(MT)
, a satellite prgrams viewer. I had put both MT and the shutdown command in a
batch file in the startup folder, but the batch file commands were executed
sequentially without waiting for me to exit MT.

My question is: is there some type of exit code condition I coule check to
let me know that MT has exited? Then and only then is when I want to run the
shutdown command.

thanks

Start /wait mt.exe

Type 'start /?' (without the apostrophes) at the CMD prompt for more
information.
 
Phil:

I tried your suggestion but what is it suppose to do for me apart from
knowing the start command options? I need to know sometype of condition I can
check with an if statement to know if the program is still running. Maybe I
am not making myself clear.
 
canoad said:
Phil:

I tried your suggestion but what is it suppose to do for me apart from
knowing the start command options? I need to know sometype of condition I can
check with an if statement to know if the program is still running. Maybe I
am not making myself clear.

Start /wait xyz will execute the program 'xyz' and wait for that program
to terminate before continuing to execute the next command in the batch
file....
 
Phil;
Thanks, at first I did not see the wait, but it makes perfect sense. I will
try it shortly.

Thanks Again
 
Phil;
Worked like a charm !!!

Thanks, You're Great

canoad said:
Phil;
Thanks, at first I did not see the wait, but it makes perfect sense. I will
try it shortly.

Thanks Again
 

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

Back
Top