GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Preserve user shortcuts pinned to Taskbar during MSI upgrade by bergmeister · Pull Request #9305 · PowerShell/PowerShell

Conversation

@bergmeister

@bergmeister Christoph Bergmeister (bergmeister) commented Apr 5, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed
      • Issue filed:
  • Testing - New and feature
    • N/A or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bergmeister
Do not remove shortcuts on upgrade to preserve user shortcuts pinned …
86f7449
…to Taskbar, see https://stackoverflow.com/a/33402698/1810304
@bergmeister Christoph Bergmeister (bergmeister) closed this Apr 5, 2019
@bergmeister
tweak fix to keep RTM and preview still side by side
c793b0c
@bergmeister Christoph Bergmeister (bergmeister) reopened this Apr 5, 2019
@bergmeister
Christoph Bergmeister (bergmeister) requested review from Paul Higinbotham (PaulHigin), Travis Plunk (TravisEz13), Aditya Patwardhan (adityapatwardhan), Andrew (anmenaga) and Dongbo Wang (daxian-dbw) as code owners April 5, 2019 22:38
@PoshChan

PoshChan-Bot (PoshChan) commented Apr 5, 2019

Copy link
Copy Markdown
Collaborator

Christoph Bergmeister (@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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TravisEz13

This comment has been minimized.

Sign in to view
@PoshChan

This comment has been minimized.

Sign in to view
@TravisEz13

This comment has been minimized.

Sign in to view
@TravisEz13

Travis Plunk (TravisEz13) commented Apr 5, 2019

Copy link
Copy Markdown
Member

PoshChan-Bot (@PoshChan) please retry windows

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@PoshChan

This comment has been minimized.

Sign in to view
@PoshChan

PoshChan-Bot (PoshChan) commented Apr 5, 2019

Copy link
Copy Markdown
Collaborator

Travis Plunk (@TravisEz13), successfully started retry of PowerShell-CI-Windows

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TravisEz13
Travis Plunk (TravisEz13) approved these changes Apr 6, 2019
View reviewed changes
@TravisEz13

Travis Plunk (TravisEz13) commented Apr 6, 2019

Copy link
Copy Markdown
Member

PoshChan-Bot (@PoshChan) Please remind me in 21 hours

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TravisEz13 Travis Plunk (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 Travis Plunk (TravisEz13) added this to the 6.3.0-preview.1 milestone Apr 6, 2019
@PoshChan

PoshChan-Bot (PoshChan) commented Apr 6, 2019

Copy link
Copy Markdown
Collaborator

Travis Plunk (@TravisEz13), will remind you in 21 hours

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@PoshChan

PoshChan-Bot (PoshChan) commented Apr 6, 2019

Copy link
Copy Markdown
Collaborator

Travis Plunk (@TravisEz13), this is the reminder you requested 21 hours ago

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TravisEz13
Travis Plunk (TravisEz13) merged commit f5fc053 into PowerShell:master Apr 7, 2019
@iSazonov Ilya (iSazonov) assigned Travis Plunk (TravisEz13) Apr 21, 2019
@bergmeister Christoph Bergmeister (bergmeister) mentioned this pull request Sep 22, 2019
PowerShell preview Pinned Taskbar Icon is lost after upgrade #10589
Closed
@iSazonov Ilya (iSazonov) mentioned this pull request Mar 4, 2020
Pinned shortcut icon disappears on upgrade #11995
Closed
TravisEz13
Travis Plunk (TravisEz13) reviewed Jul 6, 2021
View reviewed changes
Comment thread assets/Product.wxs
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>

@TravisEz13 Travis Plunk (TravisEz13) Jul 6, 2021

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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:

PowerShell/assets/wix/Product.wxs

Line 41 in 8dcd5a2

Id="*"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@TravisEz13 Travis Plunk (TravisEz13) Jul 6, 2021

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

#12792

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@bergmeister @TravisEz13
Preserve user shortcuts pinned to Taskbar during MSI upgrade (PowerSh…
47e60e6
…ell#9305)

Fixes PowerShell#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 PowerShell#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 upgrading 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@TravisEz13 Travis Plunk (TravisEz13) TravisEz13 approved these changes
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Awaiting requested review from adityapatwardhan
@anmenaga Andrew (anmenaga) Awaiting requested review from anmenaga
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw
@PaulHigin Paul Higinbotham (PaulHigin) Awaiting requested review from PaulHigin

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@TravisEz13 Travis Plunk (TravisEz13)

Labels

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

Projects

None yet

Milestone

7.0.0-preview.1

Development

Successfully merging this pull request may close these issues.

Feature Request: Windows pinned shortcuts to remain after updates

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@bergmeister @PoshChan @TravisEz13
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.