问题
After removing a WPF application which were installed with WiX, the app's icon, previously pinned to the Windows 7 taskbar, have not been removed automatically. It remains orphaned and needs to be removed manually. Is it a supposed, typical behaviour?
The problem is that after a major upgrade of the application, the pinned icon remains inactive and needs to be manually deleted and repinned. It confuses some users.
Is there a possibility to delete or reactivate the app's icon, pinned to the Windows 7 taskbar, when doing an application major upgrade with WiX installer?
回答1:
You should rather change strategy: you need to set AppUserModelID on your shortcut. The value of this property should not change during upgrade. Then the shell, Windows Taskbar, will know to update its pinned shortcut.
You can read more on shortcut properties in Windows 7 Taskbar support with the MsiShortcutProperty table.
There's also a sample code in WiX which shows how to set shortcut property.
来源:https://stackoverflow.com/questions/8909736/removing-a-pinned-apps-icon-from-the-windows-7-taskbar-on-the-applications-maj