I'll list the .bat file which I have scheduled to run daily. It manages to 'kill' the 3 processes and children but their icons remain in systray. So an icon is not a child process I guess. This causes a problem when I start the 3 instances again, multiple icons exist in "Customize notification icons", some from the 'old' processes and some from the 'new', and these somehow conflict and therefore none of them appear.
Is there a way that I can also 'kill' the icons when I use "TASKKILL" to 'kill' the 3 instances/processes?
As it says in the .bat file, there's a 'pause' so that I can run my cursor over the systray which deletes the icons, then when the processes are started, their icons appear and work. But I'd like to run this without manual intervention.
Thanks,
J
The NWdaily.bat file:
cd c:\ echo on REM Delete all records in Networx table "application". REM (sqlite3 can't delete records if networx.exe is active and REM networx.exe can't Start if either networx1.exe or networx2.exe are active REM so kill all three, run sqlite3 and then Start all three) REM /FI is a filter to find all tasks that have an IMAGENAME = "networx*" REM /IM=image(program) name /F=Force /T=including all child processes taskkill /FI "IMAGENAME eq networx*" /IM networx* /T /F REM xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx REM xx PAUSE to pass cursor over icons in systray to remove them, xx REM xx else, if not done, there are multiple icons = bad news. xx REM xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Pause REM --------------- can't run sqlite3 from G: ---------------- cd C:\sqlite3_run sqlite3.exe "G:\Portable\NetWorx\StatsI\networx.db" "DELETE FROM application" cd C:\ start /D "C:\Program Files\Networx" networx.exe start /D "G:\Portable\NetWorx\networx1" networx1.exe start /D "G:\Portable\NetWorx\networx2" networx2.exe REM xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx REM Pause to verify that icons are visible again REM xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Pause