Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 660
rem Avatar asked Oct 08 '22 23:10

rem


1 Answers

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.

like image 193
Alexey Ivanov Avatar answered Oct 13 '22 09:10

Alexey Ivanov