I'm struggling to understand how user pinned shortcuts in windows explorer work in relation to windows installer. I was under the impression that the User Pinned shortcuts were completely user handled, but it seems windows installer will find (and modify) user pinned shortcuts when installer shortcuts are removed.
This is basically two related questions, one relating to early scheduling of uninstall, and relating to late scheduling, and in particular changing from early to late between versions.
Cached "internal" icons from msi's still work after upgrade
Example: Application v1.0 installs a non-advertised shortcut on the desktop, and uses an icon internal to the msi. The user then does "pin to taskbar". Both the taskbar and the desktop shortcut now references an icon copied from the msi into the icon cache, such as %SystemRoot%\Installer\{CB24D097-4E8F-4E8E-8FE3-EACF5954DE56}\MyApp.ico
.
Application is upgraded to v2.0 via a Major upgrade with late scheduled removal of v1. The user pinned shortcut will not be corrupted/removed, it keeps the same icon even though the icon (presumably?) belonged only to the v1 installer? Why does this work? Is there ever a risk that the cached icon will be removed in the future, thereby corrupting the user pinned shortcut?
Early scheduling of uninstall corrupts user pinned shortcuts
If application is upgraded from v1.0 to v2.0 with a Major Upgrade using an early uninstall of the previous version, then as the application (temporarily) removes the installer-provided shortcut on the desktop, something also corrupts the user pinned shortcut. The only workaround I have found (short of programatically hacking shortcuts back into place) is to make the installer not remove shortcuts at all, instead removing the .lnk via doing a <RemoveFile on="uninstall">
for the shortcut. (See Wix - Do Not Remove Pinned Taskbar on Install)
Now, this hack works well enough for a chain of major upgrades that all have uninstall scheduled early, and as described in the previous paragraphs - late scheduling seems to always work even without hacks-
However, what if v1.0 is already shipped with late uninstall, and v2.0 is the first upgrade to uninstall the previous version early?
Is there any way I can influence the uninstall of v1.0 in the V2.0 msi? Specifically, can I somehow persuade the v1.0 uninstall to skip the remove shortcuts step?