Good questions. Maybe it is a duplicate to Win32::SysTray. Still, I kind of would like to re-use the code in an easier way than copying the script from one webapp to the next one. And even when using Win32::SysTray, I would have this issue.
The code can be seen here:
https://gist.github.com/asb-capfan/a626e48e6e6d11ba0dc1570e53f37769