Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two exe file I need run at the same time, and when the first get closed close the other one.

start programA.exe
start programB.exe

onclose(programA.exe)
taskkill /im programB.exe

Not working. Just for easier understanding.

share|improve this question

migrated from stackoverflow.com Jun 5 '13 at 8:42

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted
start notepad.exe
start /wait calc.exe
echo wait until calc.exe is finished
echo then kill notepad.exe
taskkill notepad.exe

Attention: if more than one instance of (in this example) Notepad is running, this may close the wrong one.

share|improve this answer
    
Thanks a lot, this is what I needed – Akxe Jun 5 '13 at 21:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .