简体   繁体   中英

By what information are applications grouped in Windows Taskbar

I have a WPF application that has two builds, one is beta and another is stable .

The user can have both of them installed at the same time, each within its own folder in %localappdata% ( %localappdata%\app-name and %localappdata%\app-name (beta) .

When they are both installed at the same time, Windows groups them on the taskbar as if being the same application.

So, the apps are not binary-equal, they reside in different directories and they do not have the same title. But there's obviously a piece of information that's shared between the two apps which is what Windows uses to determine how to group the apps, but I don't know what piece of information that is.

What is that piece of information which I need to change for one of them so that they can be properly distinguished by Windows in order for each to have its own taskbar item?

The GUID in assembly info:

You should create a different GUID for each version https://learn.microsoft.com/en-us/do.net/api/system.guid.newguid?view.net-7.0

在此处输入图像描述

The taskbar grouping is based on the Application User Model IDs (AppUserModelIDs) . If you don't specify one then Windows will generate one for you using undocumented details.

You can p/invoke SetCurrentProcessExplicitAppUserModelID to set a specific one for the whole process. It is also possible to set one per window.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM