Skip to content

Conversation

@bergmeister
Copy link
Contributor

@bergmeister bergmeister commented Apr 5, 2019

PR Summary

Fixes #8919

Preserve user shortcuts pinned to Taskbar during MSI upgrade by not removing shortcuts in this case (assuming the user has not changed the installation directory), see https://stackoverflow.com/a/33402698/1810304
This also requires the Guid to not always be re-generated, which PR #7701 originally added to ensure shortcuts get removed when RTM and preview are installed, the underlying problem was rather that RTM and preview shared the same GUIDs, therefore the GUIDs are hard-coded again but different for RTM and preview, therefore the shortcuts will still always get removed on uninstall. But this also means those GUIDs should change when the default installation directory changes, i.e. in PowerShell 7. Should we write the code to already take this into account that it does not get forgotten?

Tested by first reproducing the issue by building installers locally (and bumping the patch version. Then the fix was applied to verify the solution, it. For this to take effect the version from which an MSI is being upgraded must have this fix already, i.e. if this fix got shipped in 6.2.1, then on ugrading to it, the issue would still occur but when upgrading 6.2.1 to 6.2.2 the shortcut would start being preserved. I am wondering if we could maybe improve this to show effect earlier by trying to extract the used (auto-generated) GUIDs in the 6.2.0 and 6.2.0-rc packages out and use them...
Please not that we probably need to take this out for 7.0 because the base installation directory will change. This also assumes that the user has not specified a different installation directory on upgrade but this is a bit of an edge case where I think other things might break as well.

PR Checklist

@bergmeister bergmeister closed this Apr 5, 2019
@PoshChan
Copy link
Collaborator

PoshChan commented Apr 5, 2019

@bergmeister, your last commit had 1 failures in PowerShell-CI-windows
PowerShellGet - Module tests.Should install a module correctly to the required location with default CurrentUser scope

Expected a value, but got $null or empty.
at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\PowerShellGet\PowerShellGet.Tests.ps1: line 134
134:         $installedModuleInfo | Should -Not -BeNullOrEmpty

@TravisEz13

This comment has been minimized.

@PoshChan

This comment has been minimized.

@TravisEz13

This comment has been minimized.

@TravisEz13
Copy link
Member

@PoshChan please retry windows

@PoshChan

This comment has been minimized.

@PoshChan
Copy link
Collaborator

PoshChan commented Apr 5, 2019

@TravisEz13, successfully started retry of PowerShell-CI-Windows

@TravisEz13
Copy link
Member

@PoshChan Please remind me in 21 hours

@TravisEz13 TravisEz13 added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 6, 2019
@TravisEz13 TravisEz13 added this to the 6.3.0-preview.1 milestone Apr 6, 2019
@PoshChan
Copy link
Collaborator

PoshChan commented Apr 6, 2019

@TravisEz13, will remind you in 21 hours

@PoshChan
Copy link
Collaborator

PoshChan commented Apr 6, 2019

@TravisEz13, this is the reminder you requested 21 hours ago

Impersonate="no" />
<InstallExecuteSequence>
<!-- Do not remove shortcuts on upgrade to preserve user shortcuts pinned to Taskbar, see https://stackoverflow.com/a/33402698/1810304 -->
<RemoveShortcuts>Installed AND NOT UPGRADINGPRODUCTCODE</RemoveShortcuts>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will always be true because of a change to force a full install every time to solve other issues:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Windows pinned shortcuts to remain after updates

3 participants