Skip to content

[Windows] Pinned PowerShell shortcuts are lost after upgrade. #6088

Closed

Description

New issue at the request of Steve Lee (@SteveL-MSFT) in issue #6080

When upgrading between new versions of PowerShell any pinned Start Menu or Taskbar Icons are lost.
If you copy the shortcut from the Start Menu to anywhere else, such as the desktop, that icon also stops functioning following an upgrade.

I believe the reason for this is because the path changes to the pwsh.exe changes after the upgrade due to the version being part of the file path for the pwsh.exe file. E.G.

  • C:\Program Files\PowerShell\6.0.0-beta.9\pwsh.exe
  • C:\Program Files\PowerShell\6.0.0-rc.2\pwsh.exe
  • C:\Program Files\PowerShell\6.0.0\pwsh.exe
  • C:\Program Files\PowerShell\6.0.1\pwsh.exe

Ideally the version number folder should be removed or at least the pwsh.exe is moved into the PowerShell folder and the rest of the files remain in the version folder. Also, is there a real need to keep the version number found on the shortcut that's placed into the Start Menu?

Steps to reproduce

  1. Uninstall PowerShell.
  2. Install PowerShell 6.0.0.
  3. Right click the 'PowerShell-6.0.0' shortcut and select 'Pin to Start' or/and 'Pin to taskbar'.
  4. Run the PowerShell 6.0.1 installer to perform an upgrade.

Expected behavior

For the PowerShell icon to remain pinned and working after the upgrade.

Actual behavior

The one in the Start Menu disappears. The one on the taskbar turns to a white default file icon which when clicked (Windows 10)...

[Window Title]
Windows

[Main Instruction]
Can't open this item

[Content]
It might have been moved, renamed, or deleted. Do you want to remove this item?

[Yes] [No]

Environment data

Name                           Value
----                           -----
PSVersion                      6.0.1
PSEdition                      Core
GitCommitId                    v6.0.1
OS                             Microsoft Windows 10.0.17083
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

  1. markekraus commented on Feb 2, 2018

    @markekraus
    Contributor

    I think this is a dupe of #5226

  2. SteveL-MSFT commented on Feb 2, 2018

    @SteveL-MSFT
    Member

    Mark Kraus (@markekraus) is right, this is a dupe.

    Andrew Palmer (@SwarfegaGit) appreciate you opening this. Comment/follow the other one which I promoted to 6.1.0-Consider.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions