Skip to content

Feature Request: Windows pinned shortcuts to remain after updates #8919

Closed

Description

@msftrncs

Summary of the new feature/enhancement

When PowerShell installations are updated on Windows, any pins (start menu, taskbar) for the shell are marked as no longer working, and are then removed, along with any items pinned in the jump lists. VS Code is able to keep its icon and its jump lists intact during upgrades, and it would be appreciated if PowerShell could do the same. It appears this was worked on at one time, but the issue might have been slightly different, as those issues are marked closed and resolved. (#6088)

Proposed technical implementation details (optional)

It appears that VS Code has a specific mechanism that fires during the install process to preserve the pins so that they stay working. I don't even remember how I ran across is, but at the time I said, `oh, that's how they do it.'

Activity

  1. added
    Issue-Enhancement
    on Feb 19, 2019
  2. iSazonov commented on Feb 21, 2019

    @iSazonov
    Collaborator

    If we install to the same folder we shouldn't have the problem.

  3. added
    WG-Maintainers-Build
    on Feb 21, 2019
  4. msftrncs commented on Feb 21, 2019

    @msftrncs
    ContributorAuthor

    Every update to two machines so far has resulted in the icon (pinned to taskbar) of the original install being removed the first time I click on it after the upgrade, with a warning saying that something has been removed. I am not sure that it is saying the target has been removed … I have looked at the target paths, they look like they should, they just point to "6" or "6-preview". This has been happening for both the stable and the preview releases. I have always used the MSI installer package to install.

  5. iSazonov commented on Feb 22, 2019

    @iSazonov
    Collaborator

    The shortcut file is created in %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar folder and always reference "C:\Program Files\PowerShell\6\pwsh.exe" -WorkingDirectory ~".
    So I don't know where root case of the problem is.

  6. msftrncs commented on Feb 22, 2019

    @msftrncs
    ContributorAuthor

    I have yet to update my second machine to 6.1.3, I can try to capture some data, checking shortcuts before and after the install. I'll do that over the weekend.

  7. msftrncs commented on Feb 27, 2019

    @msftrncs
    ContributorAuthor

    Ilya (@iSazonov), during the install (upgrade) process, the shortcut you mentioned above was deleted from the folder you mentioned above. The icon then goes blank on the taskbar. I am not sure if the installer (the MSI package) or the OS removed the file. I was watching the contents of the folder and the file was deleted towards the end of the install (which went pretty quickly). I made a copy of the shortcut file before the install. Restoring this file did not completely restore the pin. The icon was still missing. I clicked on the 'Change Icon...' button and this interesting message appeared.

    image

    The restored pin shortcut does work, it just doesn't have an icon.

    Hope this helps.

  8. msftrncs commented on Mar 29, 2019

    @msftrncs
    ContributorAuthor

    After installing 6.2.0 release, I checked the icon location to the start menu shortcut, it points to the installer folder. The icon really needs to be stored in the application folder. Looks like its already in the assets folder, but it would appear that the installer keeps updating the start menu shortcut to point to the newest installer folder.

    It appears that each new update removes the previous installer folder, and its that which causes the pinned link on the taskbar to be removed. Even if the same install folder is 're-installed' during installation the damage is already done (maybe depending on system speed).

  9. iSazonov commented on Mar 29, 2019

    @iSazonov
    Collaborator
  10. added
    Issue-Bug
    and removed
    Issue-Enhancement
    on Mar 29, 2019
  11. bergmeister commented on Mar 29, 2019

    @bergmeister
    Contributor

    First of all: I've observed this behaviour as well.
    I am wondering if this is a side effect of #7701 . At that time the installation directory had the full version name in it, so it made sense to auto-generate the Guid. Now that the directory name is a constant 6 we could go for the approach of just having 2 separate Guids for RTM and preview and then this might not occur any more.
    Note though that the team is usually reluctant to add such improvements in a patched version of PS and 6.3 might be based on MSIX, which is a new installation technology. Therefore even if we submit a PR it might not make it to the end user in time

  12. SteveL-MSFT commented on Apr 5, 2019

    @SteveL-MSFT
    Member

    Christoph Bergmeister (@bergmeister) although I'm working on a MSIX package, MSIX aren't installable on Server skus, so we'll still need the MSI. Go ahead and work on your PR.

  13. bergmeister commented on Apr 5, 2019

    @bergmeister
    Contributor

    OK. I just tried an experiment and reverted the change of #7701 locally and the problem did still occur so it must be something else.
    It looks like it is an msiexec problem, see this thread and proposed solution: https://stackoverflow.com/a/33402698/1810304

  14. added a commit that references this issue on Apr 7, 2019
    f5fc053
  15. added a commit that references this issue on Aug 6, 2026
    47e60e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugResolution-FixedWG-Maintainers-Build

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions