I'm not very experienced. I want to start EventGhost (EG) which will start MediaMonkey (MM) and when MM is ended, the batch job will end EG. Here is my batch job which starts EG (and MM) but does not stop EG when MM stops.
cd C:\Program Files (x86)\
Start EventGhost\EventGhost.exe -hide -configdir N:\Program Info\EventGhost for MediaMonkey
cd C:\
start "MM" /wait "C:\Program Files (x86)\MediaMonkey\Mediamonkey.exe"
stop "" "C:\Program Files (x86)\EventGhost\EventGhost.exe"
cls
exitI tried this start /wait which I got from the EG forum but it doesn't work either. I tried many different iterations of this (with ", etc. but nothing works). I don't understand what the && is for and can't find info on this anywhere.
cd c:\Program Files (x86)\
start /wait MediaMonkey\Mediamonkey.exe && EventGhost\EventGhost.exe -e ProgramFinishedI think I'm close but don't know what else to try.
Thanks.
I think the && translates as "and if successful". So that whole line translates as: start MediaMonkey.exe and wait for it to terminate. If that is successful, start EventGhost.
see: http://www.robvanderwoude.com/conde...
I'm not sure that the && will work in conjunction with /wait though. You might put them on separate lines like this:
@echo off
cd "c:\program files (x86)"
start /wait MediaMonkey\Mediamonkey.exe
start EventGhost\EventGhost.exe -eIf that doesn't work, I can help you come up with an IF statement that will check for MediaMonkey termination prior to starting EventGhost.
This works.
@echo off
cd C:\Program Files (x86)\
Start EventGhost\EventGhost.exe -hide -configdir N:\Program Info\EventGhost for MediaMonkey
cd C:\
start "MM" /wait "C:\Program Files (x86)\MediaMonkey\Mediamonkey.exe"
taskkill /im EventGhost.exe /t /f
cls
exit
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |