The document didn't mention deleting the existing icon as well
When the taskbar is created, it registers a message with the TaskbarCreated string and then broadcasts this message to all top-level windows. When your taskbar application receives this message, it should assume that any taskbar icons it added have been removed and add them again.
https://learn.microsoft.com/en-us/windows/win32/shell/taskbar#taskbar-creation-notification
Fixes https://github.com/tauri-apps/tauri/issues/9335
Re-add tray icon on
TaskbarCreated
messageThis is what Electron does
I don't quite understand why the Power Toys' implementation doesn't use the
NIM_DELETE
while still worksThe document didn't mention deleting the existing icon as well