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
Don't know what caused it or how to prevent it (see Heath Stewart (@heaths)' comment below), but you can remove the context-menu entries as follows (update: now perform a search for all relevant keys):
# MUST BE RUN FROM AN ELEVATED CONSOLE.# Target version whose context menus to remove.# Use the version suffix as it appears in the shortcut menus,# and append the bitness of the installation ('x64' vs. 'x86' (32-bit))$version='7-previewx64'# Find all relevant key paths.$keyPaths=@(
reg query HKEY_CLASSES_ROOT /s /k /e /f "PowerShell$version"|Select-Object-SkipLast 1
) -ne''-replace'^','registry::'Remove-Item-Recurse $keyPaths-WhatIf
-WhatIf previews what would get deleted; remove it once you're confident the right keys are being targeted.
Reacted by Maximo Trinidad, Andrew Santhosh, ZonderP and EtiamNullam
Please provide the system environment information, as this is very helpful!
Now that PowerShell 7 is GA, there's no need to install back the any of the PowerShell 7 RC's.
The next Preview coming out is PowerShell 7.1 which, I think will be coming soon.
Better off doing a uninstall of the PowerShell Preview and everything should be OK.
Right-click on it and go to the shortcut location, if you even get the option. If not, it's a visual cache issue that sometimes happen with Windows. Or did you by chance create this shortcut yourself, or customize console host setings (font, buffer size, etc.)? That will also create a user shortcut (replaces .pif files from old that will not be cleaned up (no way for Windows Installer to track it).
Heath Stewart (@heaths), I think you're thinking about a taskbar icon's context menu, whereas @YMba9g8j9CJp0wLoQf5y is talking about a File Explorer / Desktop folder's shortcut menu.
Okay. Likely because the component GUIDs were changed. This affects ref-counting components. I'll be rescheduling RemoveExistingProducts which will fix a lot of these issues as well. (Generally, don't hardcode component GUIDs unless you have to with WiX 3.10 and newer.)
If you can't run this command, you couldn't possibly have successfully removed the keys with the removal commands, given that that command is part of the latter.
Make sure that you run the commands as an administrator.
And, generally, please be more specific up-front about what actually happened when you say things like "I just tried the new removal command" and things didn't work as expected.
Activity
mklement0 commentedon Mar 11, 2020
Don't know what caused it or how to prevent it(see Heath Stewart (@heaths)' comment below), but you can remove the context-menu entries as follows (update: now perform a search for all relevant keys):-WhatIfpreviews what would get deleted; remove it once you're confident the right keys are being targeted.MaximoTrinidad commentedon Mar 12, 2020
@YMba9g8j9CJp0wLoQf5y
Please provide the system environment information, as this is very helpful!
Now that PowerShell 7 is GA, there's no need to install back the any of the PowerShell 7 RC's.
The next Preview coming out is PowerShell 7.1 which, I think will be coming soon.
Better off doing a uninstall of the PowerShell Preview and everything should be OK.
mklement0 commentedon Mar 12, 2020
Maximo Trinidad (@MaximoTrinidad), note the premise of this issue:
MaximoTrinidad commentedon Mar 12, 2020
Michael Klement (@mklement0)
I keep forgetting to mention that I manually clean up any left-over folders after the uninstall process. It seems to work for me.
:)
iSazonov commentedon Mar 12, 2020
/cc Heath Stewart (@heaths) Christoph Bergmeister (@bergmeister)
heaths commentedon Mar 12, 2020
Right-click on it and go to the shortcut location, if you even get the option. If not, it's a visual cache issue that sometimes happen with Windows. Or did you by chance create this shortcut yourself, or customize console host setings (font, buffer size, etc.)? That will also create a user shortcut (replaces .pif files from old that will not be cleaned up (no way for Windows Installer to track it).
mklement0 commentedon Mar 12, 2020
Heath Stewart (@heaths), I think you're thinking about a taskbar icon's context menu, whereas @YMba9g8j9CJp0wLoQf5y is talking about a File Explorer / Desktop folder's shortcut menu.
@YMba9g8j9CJp0wLoQf5y, can you confirm?
mklement0 commentedon Mar 12, 2020
Yes, that's what I meant - these entries there are controlled via registry entries, not shortcut files, hence my manual removal commands above.
heaths commentedon Mar 12, 2020
Okay. Likely because the component GUIDs were changed. This affects ref-counting components. I'll be rescheduling
RemoveExistingProductswhich will fix a lot of these issues as well. (Generally, don't hardcode component GUIDs unless you have to with WiX 3.10 and newer.)MaximoTrinidad commentedon Mar 12, 2020
Cool!
I was able to reproduce the issue on a clean VM.
All short-cuts icons show up fine.
The PowerShell Preview shortcut is not removed.
Now I understand the work-around, to remove manually the entries from the registry:
manual removal commands
Here's the image of the registry after the uninstall of the PowerShell Preview:
Now, If I run the installation of PowerShell Preview again, I get back the shortcut to work.
Thanks, Michael Klement (@mklement0)
20 remaining items
mklement0 commentedon Mar 20, 2020
@YMba9g8j9CJp0wLoQf5y, and the following produces no output?
reg query HKEY_CLASSES_ROOT /s /k /e /f "PowerShell7-previewx64"mklement0 commentedon Mar 20, 2020
@YMba9g8j9CJp0wLoQf5y:
If you can't run this command, you couldn't possibly have successfully removed the keys with the removal commands, given that that command is part of the latter.
Make sure that you run the commands as an administrator.
And, generally, please be more specific up-front about what actually happened when you say things like "I just tried the new removal command" and things didn't work as expected.
mklement0 commentedon Mar 20, 2020
If you're at least able to run
Remove-Itemas admin, then try to use the following, explicit list of key paths (obtained with thereg querycommand):mklement0 commentedon Mar 20, 2020
@YMba9g8j9CJp0wLoQf5y, sorry - had forgotten the
registry::provider prefix - please see the since-updated previous comment.iSazonov commentedon Mar 20, 2020
We will get updated MSI in next month.