During an installation or major upgrade, if a user has pinned the application to their task bar, then after the installation has completed, the task bar shortcut is removed from %AppData%\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
and a blank-file icon (see image link below) is left in its place.
Clicking the icon will prompt the user to delete as it doesn't target anything.
(Mirror: http://i.stack.imgur.com/kz1zW.png)
I would like to make it such that the taskbar shortcut is not removed at all when installing or running a major upgrade. We push out updates on a weekly basis and it can be frustrating if the taskbar shortcut breaks during every update.
Is this possible?
I've read about modifying the value for RemoveExistingProducts
(i.e. changing from InstallValidate
to InstallFinalize
), but I'm unsure if this will be viable.
You can avoid custom actions by disabling the standard RemoveShortcuts as follows:
<InstallExecuteSequence>
<RemoveShortcuts>Installed AND NOT UPGRADINGPRODUCTCODE</RemoveShortcuts>
</InstallExecuteSequence>
This disables removing shortcuts except on uninstall.
We encountered this issue and our investigation reveals that msiexec.exe explicitly removes pinned item when remove corresponding shortcut on uninstall or major upgrade.
As workaround we did the following:
Disabled standard RemoveShortcuts
action using the following WiX code:
<InstallExecuteSequence>
<RemoveShortcuts>0</RemoveShortcuts>
</InstallExecuteSequence>
Added explicit <DeleteFile>
entry for every shortcut we install. For example:
<DirectoryRef Id="ProgramMenuDir">
<Component Id="Component" Guid="B7469BFC-BF2A-4AF7-9DF5-3458BB485F18">
<Shortcut Id="Shortcut" Name="My Supper App"
Directory="ProgramMenuDir" Target='MyApp.exe' />
<RemoveFile Id="RemoveShortcut"
Name="My Supper App.lnk"
On="uninstall" />
</Component>
</DirectoryRef>
It seems to be working fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With