Removing a pinned app's icon from the Windows 7 taskbar on the application's major upgrade with WiX

孤人 提交于 2020-01-13 02:50:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!