Preserve user shortcuts pinned to Taskbar during MSI upgrade#9305
Merged
TravisEz13 merged 2 commits intoPowerShell:masterfrom Apr 7, 2019
Merged
Preserve user shortcuts pinned to Taskbar during MSI upgrade#9305TravisEz13 merged 2 commits intoPowerShell:masterfrom
TravisEz13 merged 2 commits intoPowerShell:masterfrom
Conversation
Collaborator
|
@bergmeister, your last commit had 1 failures in 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 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Member
|
@PoshChan please retry windows |
This comment has been minimized.
This comment has been minimized.
Collaborator
|
@TravisEz13, successfully started retry of |
TravisEz13
approved these changes
Apr 6, 2019
Member
|
@PoshChan Please remind me in 21 hours |
Collaborator
|
@TravisEz13, will remind you in 21 hours |
Collaborator
|
@TravisEz13, this is the reminder you requested 21 hours ago |
TravisEz13
reviewed
Jul 6, 2021
| 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> |
Member
There was a problem hiding this comment.
This will always be true because of a change to force a full install every time to solve other issues:
PowerShell/assets/wix/Product.wxs
Line 41 in 8dcd5a2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 upgrading6.2.1to6.2.2the 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 the6.2.0and6.2.0-rcpackages out and use them...Please not that we probably need to take this out for
7.0because 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
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.