Hyper-V Program Manager
I have been asked a couple of times why the icons in the task bar for seamless applications are all wrong. If you look at this picture:
You will see that while I have three seamless applications running, and they display correctly under task manager, I only have two Windows Virtual PC icons in the task bar – and both of them have the Windows Virtual PC icon instead of the appropriate notepad / live writer / command prompt icons.
To understand what is happening here – you need to know what is going on behind the scenes. For each virtual machine that is providing seamless applications we have a single copy of vmsal.exe running. In the above picture I have notepad and command prompt running under a Windows XP virtual machine, and Live Writer running under a Windows 7 virtual machine. This means that I have two instances of vmsal.exe running.
For each seamless application – we identify the window that we draw in the host, and modify the window name and icon to reflect the application inside the virtual machine. This is why you see the correct information under task manager.
When the task bar groups windows together, it looks for multiple windows that are managed by the same process, and then uses icon that belongs to the base executable file (rather than the icons that are set on the individual windows). So as a result the Windows task bar groups separate applications that are being hosted by the same instance of vmsal.exe, and displays the icon that belongs to vmsal.exe.
If you really want to see the right icons, you need to change the process grouping behavior for the task bar. To do this:
When I do this on my system what I get is this:
Now I see each seamless application with the right icon and name.
Hmm, interesting. In MSDN Magazine July 2009 there is a long article covering different aspects of the new taskbar (http://msdn.microsoft.com/en-us/magazine/dd942846.aspx).
In the article a concept called "application ID" is mentioned that can be used to explicitly control grouping of application icons on the taskbar. Wouldn't it have been possible to generate an own application ID per unique guest application? If you detect a guest that supports application IDs you could even have used the same appID for the corresponding host window. In that case even Notepad on the host and Notepad in a Win7 guest would have been grouped together...
Did you consider supporting and using application IDs? Is it a feature that had to be cut? Or is it impossible to implement because of architecture or other constraints?
Why not set a separate app model ID for each window, so that they don't group together? The grouping here doesn't really make sense, since the apps aren't related (aside from existing within the same VM).