5
votes

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
Are you worried about users who pinned it being confused, or did your installer cheat and pin it? For reference, Apple's iTunes has this problem for the former scenario, so it might be, ah, "acceptable behavior".Michael Urman
@MichaelUrman No cheat from the installer. I just wanted to make my installation process more polished; not to force a user think and not to force a user to do something additionally.rem
Okay, the party line answer is then that your installer has no knowledge about this shortcut so it can't be expected to fix it. Personally I think of this as a bug or limitation in the Windows shell experience; more of a bug if the target didn't move, more of a limitation if the major upgrade's target is in a new location.Michael Urman

1 Answers

4
votes

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.