views:

530

answers:

1

My application launches using an advertised shortcut in the Windows Start Menu. This means the shortcut doesn't link directly to my exe, though the exe is ultimately what runs.

My problem is: when I right click the shortcut in the Windows 7 taskbar and select Pin to Taskbar, and then launch my application, I end up with two icons in the taskbar. (So the running app does not re-use the existing taskbar icon.) Does anyone know how to fix this?

Unfortunately, the choice of using an advertised rather than a direct shortcut is not up to me.

By the way, there is another way to pin a program to the taskbar in Windows 7: right click the icon of the running application. If I do it this way, I don't end up with the duplicate icons, so I'm fairly certain the problem is the advertised shortcut.

Thanks, Amy

+6  A: 

Hi Amy,

In this case you need to use explicit AppID. When you create the shortcut you can specify AppID. At the same time you also need to specify the same AppID at the following places: all running windows or process, file association, jumplist.

For more information about AppID you can reference http://msdn.microsoft.com/en-us/library/dd378459(VS.85).aspx.

Sophie

related questions