Open program after another one closes

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Dosanderson
Posts: 4
Joined: 26 Mar 2013 06:48

Open program after another one closes

#1 Post by Dosanderson » 26 Mar 2013 06:53

i want a dos batch to detect when I close a certain file and automatically open another file, any ideas?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Open file after one closes

#2 Post by foxidrive » 26 Mar 2013 07:04

Task list in a loop will help, if your OS has tasklist.exe

Dosanderson
Posts: 4
Joined: 26 Mar 2013 06:48

Re: Open file after one closes

#3 Post by Dosanderson » 26 Mar 2013 07:32

I'm going to run on multiple machines, I can't be sure all have task list.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Open file after one closes

#4 Post by foxidrive » 26 Mar 2013 08:23

Tasklist or PSlist (free download from Microsoft) will allow you to monitor what is running easily.

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Open file after one closes

#5 Post by Squashman » 26 Mar 2013 13:40

Windows XP and above all have TASKLIST

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Open file after one closes

#6 Post by foxidrive » 26 Mar 2013 13:48

Does XP Home have tasklist but not taskkill? I am 99% sure it doesn't have taskkill.exe but not sure about tasklist.exe

EDIT:

Ahh, it doesn't have either. But it's available.

http://answers.microsoft.com/en-us/wind ... 1c107441a5

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Open file after one closes

#7 Post by Squashman » 26 Mar 2013 13:54

foxidrive wrote:Does XP Home have tasklist but not taskkill? I am 99% sure it doesn't have taskkill.exe but not sure about tasklist.exe

EDIT:

Ahh, it doesn't have either. But it's available.

http://answers.microsoft.com/en-us/wind ... 1c107441a5

Ah Yes. There were a few OxyMorons (pun intended) at Microsoft with Windows XP Home. It had TSKILL but not TASKKILL. Makes not sense to not include TASKLIST.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Open file after one closes

#8 Post by foxidrive » 26 Mar 2013 14:33

Dosanderson wrote:i want a dos batch to detect when I close a certain file and automatically open another file, any ideas?


Are you talking about program files, or data files?

Dosanderson
Posts: 4
Joined: 26 Mar 2013 06:48

Re: Open file after one closes

#9 Post by Dosanderson » 26 Mar 2013 18:46

foxidrive wrote:
Dosanderson wrote:i want a dos batch to detect when I close a certain file and automatically open another file, any ideas?


Are you talking about program files, or data files?


Program files

pditty8811
Posts: 184
Joined: 21 Feb 2013 15:54

Re: Open program after another one closes

#10 Post by pditty8811 » 28 Mar 2013 02:45

Would it be ok if the batch file started with the first program? It would then detect when you close the first program process, then it would launch the second.

Dosanderson
Posts: 4
Joined: 26 Mar 2013 06:48

Re: Open program after another one closes

#11 Post by Dosanderson » 28 Mar 2013 18:29

pditty8811 wrote:Would it be ok if the batch file started with the first program? It would then detect when you close the first program process, then it would launch the second.

Yeah that would work fine, can you go into a little more detail about how to do this?

Post Reply