Share via

Duplicate application icons in taskbar after running overnight.

Liang, Ming 101 Reputation points
2026-03-09T00:52:43.8666667+00:00

We have a WinUI 3 application. When it is launched in Win11, there is one application icon on the taskbar. But there will be two application icons on the taskbar after the application running overnight.

What are the possible causes of this duplicate icon issue, thanks.

Windows development | WinUI
0 comments No comments

2 answers

Sort by: Most helpful
  1. Jay Pham (WICLOUD CORPORATION) 3,515 Reputation points Microsoft External Staff Moderator
    2026-03-09T06:54:51.75+00:00

    Hello @Liang, Ming ,

    Thank you for reaching out to.

    Sometimes a simple reboot can clear up lingering graphical glitches or stuck processes in the Windows taskbar.

    If a restart does not resolve the issue, and you still see the second icon appearing after the app runs overnight, this behavior usually happens because Windows thinks a new, distinct application is running.

    To help me investigate further, could you please provide a few more details?

    1. Background Processes: Does your application launch any secondary processes overnight (such as a helper .exe, an automatic background updater, or a crash-handler)? If so, Windows will display a separate taskbar button for that new process.
    2. AppUserModelID: Are you explicitly assigning an AppUserModelID (AUMID) to your application in your code? If no AUMID is set, Windows tries to group apps by their file path, and any slight change can cause it to create a new icon.
    3. Task Manager: If you leave the Windows Task Manager open overnight, do you see a secondary instance or helper process running alongside your main application when the second icon appears in the morning?

    Please let me know the results, and I will be happy to help you troubleshoot this further.

    If you were able to resolve the issue during troubleshooting, I would greatly appreciate it if you could share your feedback by interacting with the system or leaving a comment.   

    Thank you.   


  2. Q&A Assist
    2026-03-09T00:52:56.34+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Windows uses the running process identity (AppUserModelID or, if none is set, the executable path) to decide how many taskbar buttons to show and which icon to use. A second taskbar icon appears when Windows believes there is a second distinct “application identity” active.

    For a WinUI 3 app, typical causes include:

    1. Process/App identity changes over time
      • The app might be spawning another process (e.g., helper EXE, elevated process, updater, crash-restart) that has a different executable path or AppUserModelID. Windows then shows a second taskbar button for that second identity.
      • If the app crashes and is relaunched by a watchdog or updater under a slightly different identity, the original “ghost” button can remain until the shell refreshes.
    2. Inconsistent or missing AppUserModelID
      • If the app does not set a stable AppUserModelID, Windows falls back to the executable path. Any change that makes Windows think it’s a different app (different path, different AUMID, different relaunch properties) can cause a new taskbar icon instead of reusing the existing one.
      • If code sets or changes the AppUserModelID at runtime (for example, after some long‑running condition or after a background update), the shell can treat the window as a new app and create a second icon.
    3. Custom taskbar/notification area handling
      • If the app uses Shell_NotifyIcon or similar APIs incorrectly (for example, adding a second icon instead of modifying or deleting the existing one), the shell can show multiple icons associated with the same logical app.
      • The taskbar always represents the running process, not the shortcut used to launch it. If a shortcut has one icon and the running EXE (or a later-launched EXE) has another, Windows will show separate entries when it thinks they are different identities.
    4. Shell or taskbar glitches
      • On some Windows versions, taskbar bugs can cause duplicate or stuck icons. These are typically addressed by OS updates; for example, Windows 8.1/Server 2012 R2 had a known issue where the taskbar could be duplicated or behave incorrectly and was fixed by an update rollup.

    In practice, for a WinUI 3 app that shows a second icon only after running for a long time:

    • Verify that only one process instance is running and that no helper/updater EXEs with different identities are being launched overnight.
    • Ensure the app sets a single, stable AppUserModelID and does not change it at runtime.
    • If using any shell/taskbar APIs directly, confirm that icons are added once and updated or deleted correctly rather than added again.
    • Make sure the OS is fully updated to pick up any taskbar fixes.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.