-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silent Update removes context menu entry if previously added #16886
Comments
Do you ask the option must be |
The option was originally on. That image is just an example from a different issue that I used to show which option I'm referring to. When I installed PowerShell 7.2.0, I enabled that option for the context menu. Ideally, that choice would be taken into account when updating. |
Does this happen through any silent MSI upgrade? |
Upgrading through winget removes the context menu. Getting it from the Windows Store, it installs a separate version if you previously installed via other means. It also does not give you the option add that context menu on the initial installation via the Windows Store, so there is no way to see if upgrading it remove it from the menu. |
I just installed Visual Studios 2019 which also added "Developer PowerShell for VS 2019" and now the "Run with PowerShell 7" Context Menu is gone. On top of this, uninstalling PowerShell 7 and then reinstalling it and checking the box to add the context menu still does not add it again. |
Still encountered this issue after updating from 7.2.4 to 7.2.5 via windows update. The context menu was gone, this could be fixed by manually tampering with registries but normal users should avoid this. Hope this issue will soon be fixed. |
same problem here... ! |
Bug is still existing! We are running 7.2.4 (installed via silent msi with ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1) and after updating via windows update or winget to 7.2.6 context menu is away! Is a fix in progress? |
Have the same issue. |
Same issue, |
Still happening with 7.3.1. I've been manually updating PowerShell 7 from the GitHub MSI installer to avoid this issue, however today I installed the Windows 10 "Patch Tuesday" updates and it automatically updated PowerShell from 7.3.0 to 7.3.1 at the same time. Therefore, I've now lost the right-click "Run with PowerShell 7" context menu. |
For me the same as in the post before. I started a deployment of 7.3.0 on a decent amount of systems with the context enabled. Does work until the auto update from wsus with 7.3.1 rolls over, then its gone. |
I just did a reboot and noticed this has happened to me too. I use this context menu constantly. Win 11 on PS v7.3.3. here. It's not entirely clear what has been installed to make this happen; I assume a windows update or a background update to PowerShell itself? I have decided to uninstall it, and reinstall it with the auto-update disabled. |
Silent update from PowerShell v7.3.4 to v7.3.5 on Windows 10.0.19045 removed context menu entries for me too. Updating to v7.3.4 via MSI (enabling the option to add context menu entries) restored them. |
Keep happening to 7.3.6. Please resolve, or be honest and just disable the option of updating automatically as it doesn't work and there is no point on fooling the users. |
disappeared for me too, after silent update :( win 10, powershell 7.3.7 |
An interesting update. I've found that if I manually add the registry entries for the "Run With PowerShell 7" command instead of re-running the installer to add it, the setting will persist through upgrades. (This does mean I'll have to manually change the references to PowerShell 8 if this is still an issue by the time it comes out.) The relevant lines for ALL of the registry entries in the installer setup are at: PowerShell/assets/wix/Product.wxs Lines 234 to 283 in dab6ca2
PowerShell/assets/wix/Product.wxs Lines 284 to 294 in dab6ca2
I only use the "Run With PowerShell" feature, so I don't know if this also applies to the "Open With PowerShell" feature, but you can at least re-add the "Run With..." entry with the following registry file (from Windows 10 and PowerShell 7x64): Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\PowerShell7x64]
"Icon"="C:\\Program Files\\PowerShell\\7\\pwsh.exe"
"MUIVerb"="Run with PowerShell 7"
[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\PowerShell7x64\Command]
@="C:\\Program Files\\PowerShell\\7\\pwsh.exe -Command \"$host.UI.RawUI.WindowTitle = 'PowerShell 7 (x64)'; if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'\"" |
…or the next installation. Fixes PowerShell#16886
… the next installation. Fixes PowerShell#16886
It just happened to me with Windows Update silent installation of 7.4.2. |
This shouldn't happen with 7.4.3 if #20420 can be merged soon |
Just a small clarification on what to expect once that PR is merged. This problem will still exist for the first version that contains the fix. The installer for that version will remember the options you choose. The version after that will use those settings that were remembered. |
📣 Hey @awsr, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
Prerequisites
Steps to reproduce
Add 'Run with PowerShell 7' context menu for PowerShell files
option in the installer. *Expected behavior
Installer sees existing "Run with PowerShell 7" context menu entry and retains it after the update.
Actual behavior
Installer removes context menu entry and installs the new version with default settings only (without context menu entry).
Error details
No response
Environment data
Visuals
* Referring to this option:
![Installer option](https://user-images.githubusercontent.com/27423064/99889643-1ddd1a00-2c4f-11eb-8ed4-d7b86a747878.png)
The text was updated successfully, but these errors were encountered: