windows - Is there a (simple) way to make one program automatically close when another does? -


i have problem think might solvable batch file, i've used batch files once or twice , don't know enough try , solve on own. context i'm running windows 10 home edition, , have programming experience, though mathematical, i.e. r , matlab.

the problem this: have 2 programs, in case spotify , toastify, run together, toastify running in background. i'll refer them s , t, respectively. if run t, s runs well, if close s, t remains running in background. reasons of convenience, rather closing s close t, when want use them again later need reopen t rather checking if it's still running in background, because t doesn't let run multiple instances.

i'm wondering if there easy way write batch file (or else if isn't approach) open t (and s), , 'listen' s close, @ point closes t well.

you need use job object. see working example of createjobobject/setinformationjobobject pinvoke in .net? , kill child process when parent process killed

do not try 'monitoring 1 process', leaves zombies when monitoring crashes.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -