The background is I use EG to launch XBMC. Because of a USB-UIRT problem, I need to kill and restart EG when resume from PC standby.
The startup I have for the XBMC macro is as follows:
Start.Program.XBMC <Event>
Ping: Remote Host: 192.168.1.10 <action> (can ignore this)
Find Window: XMBC <action> (Search invisible, Stop macro if target is found, Program: XBMC.exe)
Start Program: XBMC.exe <action>
So it should look for a running XBMC.exe program / process and if found end the macro. In testing it within EG it works fine.
Now I kill and restart EG from a batch file, and when it runs it always closes and restart XBMC.exe. The batch file makes no reference to XBMC, but if anyone would like to test here is the batch file:
Batch File:
Code: Select all
@echo off
tasklist /nh /fi "imagename eq EventGhost.exe" | find /i "EventGhost.exe" >nul && (
taskkill /F /T /IM EventGhost.exe >nul
) || (
rem EventGhost isn't running
)
start "" "C:\Program Files (x86)\EventGhost\EventGhost.exe" -h