Author Topic: Systray cleanup  (Read 2279 times)


  • Newbie
  • *
  • Posts: 42
Systray cleanup
« on: January 14, 2015, 06:53:32 am »
Does anyone know of a way to clear dead icons from the system tray?

I've got a few winbatch application that have system tray icons. Some of these run at startup. I'm also using Zenworks so if I have a new version of application XYZ, and XYZ is an application that runs at statup (therefore always running) then I get zenworks to kill the process, copy the new version of the file and then run it again. The problem is that I now have 2 XYZ icons in the system tray. Does anyone know of a way to clear dead icons from the tray? Either some winbatch commands or a small EXE or something?



  • Full Member
  • ***
  • Posts: 162
Re: Systray cleanup
« Reply #1 on: January 14, 2015, 07:34:08 am »
If the icons are still in system tray then use this
You may need to adjust the mouse co-ordinates
Code: Winbatch
CurrLocn = MouseInfo(2)
Locn1 = ItemExtract(1, CurrLocn, " ")
Locn2 = ItemExtract(2, CurrLocn, " ")
For X = 800 to 1000
MouseMove(X , 970, "", "")
MouseMove(Locn1, Locn2, "", "")

if you actually need to kill the app then post back, I have a different code for it