In Inno Setup, how can I update the notification area, (aka the system tray)?

后端 未结 1 906
小鲜肉
小鲜肉 2021-01-24 12:49

In Inno Setup, how can I update the notification area, (aka the system tray)? Specifically, I\'m installing a service in the Code section which puts an icon in the tray. I\'d

相关标签:
1条回答
  • 2021-01-24 13:51

    I'm guessing you are using taskkill to kill the task. If not, please disregard this answer :-)

    But, if so, then I had the exact same problem, and fixed it with a simple change to my bat file and without having to install any other programs.

    The problem was I was running taskkill with /f wich forces (hard) kills the task. If you kill it without the /f it sends a close signal to the application, the application exits cleanly and removes its system tray icon.

    In my bat file I do two taskkill commands; the first without the /f and then again with the /f. If the first one works (which it usually should) then all is well and the system tray icon goes away. If for some reason the first one fails, the the second one will still kill it, although in that case the system tray icon would not be removed.

    So, in my case, I use: taskkill /t /im Memu* taskkill /f /t /im Memu*

    Works great :-)

    0 讨论(0)
提交回复
热议问题