[wix-users] How to preserve Icon Guid of user pinned shortcut during Upgrade

Christoph Bergmeister c.bergmeister at gmail.com
Sun Aug 25 04:36:28 PDT 2019


Hi,

When upgrading an MSI, we disable RemoveShortcuts
<https://github.com/PowerShell/PowerShell/blob/master/assets/Product.wxs#L77>
in
order to preserve user pinned shortcuts to the taskbar. Those shortcuts
come from the ApplicationProgramsFolder and we already use a constant GUID
for the component that the shortcut is in (which allowed the pinned
shortcuts themselves to be preserved during upgrade).
However, the icon of the user pinned shortcut becomes invalid after an
upgrade because it points to the old one (path is of the form
%SystemRoot%\Installer\{GUID}\IconId). As far as I know I can only specify
an Icon element in the Icon property of the Shortcut element and not a path
(which is a constant in this case). Is it possible to somehow preserve the
Icon Id/Guid during an upgrade so that the icon of pinned shortcuts get
preserved? The shortcut is defined here:
https://github.com/PowerShell/PowerShell/blob/master/assets/Product.wxs#L239

Thanks,

Christoph Bergmeister
Microsoft MVP (Cloud and Datacenter Management - PowerShell)


More information about the wix-users mailing list