You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Windows pinned shortcuts to remain after updates #8919
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)
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.'
Reacted by Michael Klement, Christoph Bergmeister, Chris McGrath and JoBrad
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.
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.
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.
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.
The restored pin shortcut does work, it just doesn't have an icon.
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).
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
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.
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
Activity
iSazonov commentedon Feb 21, 2019
If we install to the same folder we shouldn't have the problem.
msftrncs commentedon Feb 21, 2019
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.
iSazonov commentedon Feb 22, 2019
The shortcut file is created in
%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBarfolder and always reference "C:\Program Files\PowerShell\6\pwsh.exe" -WorkingDirectory ~".So I don't know where root case of the problem is.
msftrncs commentedon Feb 22, 2019
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.
msftrncs commentedon Feb 27, 2019
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.
The restored pin shortcut does work, it just doesn't have an icon.
Hope this helps.
msftrncs commentedon Mar 29, 2019
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).
iSazonov commentedon Mar 29, 2019
/cc Christoph Bergmeister (@bergmeister) Steve Lee (@SteveL-MSFT) It seems a bug
bergmeister commentedon Mar 29, 2019
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
6we 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
SteveL-MSFT commentedon Apr 5, 2019
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.
bergmeister commentedon Apr 5, 2019
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
msiexecproblem, see this thread and proposed solution: https://stackoverflow.com/a/33402698/1810304Preserve user shortcuts pinned to Taskbar during MSI upgrade (#9305)
Preserve user shortcuts pinned to Taskbar during MSI upgrade (PowerSh…