Now for a proper answer.
Just use a simple AutoIt script instead of taskkill /F /IM:
WinClose("SpeedFan")
You just need to make sure that "Minimize on close" is disabled in the SpeedFan configuration ("Options"-Tab).
I'm sorry if this is not a proper answer
and I can't back it up with personal experience
but have you even tried to find a solution?
My general approach would be to make virtual mouse movements or use some Windows-api calls to force windows to refresh the notification area.
I've never done something like that but after a few searches i arrived at this Google Search String: windows refresh icons "system tray" OR "notification area" autohotkey OR autoit
One good looking result: AHK - ow-to-refresh-system-tray-icons
Another one: autohotkey.com/board/topic/80624-notrayorphans/ (linked in the thread from above)
Other results (without autohotkey OR autoit):
- refreshing-the-notification-area-system-tray
forum.lazarus.freepascal.org/index.php?topic=14847.0
blog.stephenklancher.com/2013/08/refreshing-the-notification-area-system-tray/ (with executable - but it doesn't seem to work on windows 8.1 with classic-shell)
There is a Possible Duplicate on SO (i remember seeing more but i can't seem to find them):
stackoverflow.com/questions/74723/can-you-send-a-signal-to-windows-explorer-to-make-it-refresh-the-systray-icons
Unfortunately i can't post more direct links and i would have preferred to write a comment instead of this 'answer'...