Skip to content

Uninstall problem(context menu was not removed) #7826

Closed

Description

@chucklu

Steps to reproduce

uninstall the previous version powershell6-preview

Expected behavior

delete the folder and context menu at the same time

Actual behavior

folder was deleted, but the context menu not

Environment data

I do not remember the version number since I have uninstalled it.
But I have the package name PowerShell-6.1.0-rc.1-win-x64.msi which used to install previous version.

image

Activity

  1. added
    WG-Maintainers-Build
    on Sep 20, 2018
  2. bergmeister commented on Oct 1, 2018

    @bergmeister
    Contributor

    I have this problem on my machine as well. It seems there must've been a faulty MSI during a preview phases when the 6.1-preview packages were renamed to 6-preview. 6.1.0 correctly removes the context menu on uninstall. Since this is a preview build, I'd advise to manually remove the left-over registry keys, you can find them here

  3. CoolOppo commented on Jun 6, 2019

    @CoolOppo

    I also have been dealing with this for months. Wish someone would whip up a quick tool to automate this as it's very annoying for hundreds of people to have to go to their registry to fully remove a program.

    Edit: got it all fixed up and it wasn't that bad

  4. bergmeister commented on Jun 6, 2019

    @bergmeister
    Contributor

    PR #8496 has been made to fix this, can you report which version. Otherwise this is just the nature of previews that some previews might have bugs in them (I saw it generally working but there were some 'bad' versions in the past that caused that). Windows 1903 added a feature called 'Sandbox' if you want to try out previews without affecting your system or having to do it in a virtual machine

  5. KalleOlaviNiemitalo commented on Jul 1, 2019

    @KalleOlaviNiemitalo

    I saw a similar problem when upgrading from 6.2.0 to 7.0.0-preview.1:

    1. Install PowerShell-6.2.0-win-x64.msi
    2. Install PowerShell-7.0.0-preview.1-win-x64.msi
    3. Uninstall 6.2.0
    4. Repair 7.0.0-preview.1, just in case the uninstallation of 6.2.0 damaged it

    After those steps, I had duplicate registry keys, e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\PowerShell6x64 and HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\PowerShell7-previewx64. The PowerShell6x64 keys ought to have been deleted. I presume Windows Installer did not delete them because the component GUID was not changed.

    This comment says PowerShell intends to switch from MSI to MSIX instead of frobbing the component GUIDs. Is that still going to happen before the 7.0.0 release?

    (By the way, I spent a while searching docs.microsoft.com for information on the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\ContextMenus key. However, it turns out to be referenced by ExtendedSubCommandsKey values of other Registry keys, rather than specially recognized by the shell.)

  6. vith commented on Aug 26, 2019

    @vith

    Christoph Bergmeister (@bergmeister) After uninstalling PowerShell-7.0.0-preview.2-win-x86.msi I am left with a broken PowerShell 7-preview (x86) menu; it seems #8496 did not fix this issue.

  7. chucklu commented on Aug 29, 2019

    @chucklu
    ContributorAuthor

    After installing PowerShell-7.0.0-preview.3-win-x64.msi, the previous preview context menu looks weird. And I have checked the C:\Program Files\PowerShell\6-preview, it might empty by the Powershell7-preview installer.
    #7826 (comment)
    image

  8. maicWorkGithub commented on Mar 19, 2020

    @maicWorkGithub

    11png

    uninstalled 6 and 7-preview, looks awful...

  9. bergmeister commented on Mar 19, 2020

    @bergmeister
    Contributor

    Please refer to this comment for manually removing left-overs #12105 (comment)
    In issue #12011 a potential solution to this is being discussed.

  10. maicWorkGithub commented on Mar 20, 2020

    @maicWorkGithub

    Christoph Bergmeister (@bergmeister) still there, need reboot?

    PS C:\WINDOWS\system32> $version = '7-previewx64'
    PS C:\WINDOWS\system32>
    PS C:\WINDOWS\system32> Remove-Item -WhatIf -Recurse "registry::HKEY_CLASSES_ROOT\Directory\shell\PowerShell$version",
    >>                              "registry::HKEY_CLASSES_ROOT\Directory\ContextMenus\PowerShell$version",
    >>                              "registry::HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShell$version",
    >>                              "registry::HKEY_CLASSES_ROOT\Drive\shell\PowerShell$version"
    WhatIf: 正在目标“项: HKEY_CLASSES_ROOT\Directory\shell\PowerShell7-previewx64”上执行操作“删除键”。
    WhatIf: 正在目标“项: HKEY_CLASSES_ROOT\Directory\ContextMenus\PowerShell7-previewx64”上执行操作“删除键”。
    Remove-Item : 找不到路径“HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShell7-previewx64”,因为该路径不存在。
    所在位置 行:1 字符: 1
    + Remove-Item -WhatIf -Recurse "registry::HKEY_CLASSES_ROOT\Directory\s ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (HKEY_CLASSES_RO...ell7-previewx64:String) [Remove-Item], ItemNotFoundEx
       ception
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    WhatIf: 正在目标“项: HKEY_CLASSES_ROOT\Drive\shell\PowerShell7-previewx64”上执行操作“删除键”。
    PS C:\WINDOWS\system32> $version = '6'
    PS C:\WINDOWS\system32> Remove-Item -WhatIf -Recurse "registry::HKEY_CLASSES_ROOT\Directory\shell\PowerShell$version",
    >>                              "registry::HKEY_CLASSES_ROOT\Directory\ContextMenus\PowerShell$version",
    >>                              "registry::HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShell$version",
    >>                              "registry::HKEY_CLASSES_ROOT\Drive\shell\PowerShell$version"
    Remove-Item : 找不到路径“HKEY_CLASSES_ROOT\Directory\shell\PowerShell6”,因为该路径不存在。
    所在位置 行:1 字符: 1
    + Remove-Item -WhatIf -Recurse "registry::HKEY_CLASSES_ROOT\Directory\s ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (HKEY_CLASSES_RO...ell\PowerShell6:String) [Remove-Item], ItemNotFoundEx
       ception
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    Remove-Item : 找不到路径“HKEY_CLASSES_ROOT\Directory\ContextMenus\PowerShell6”,因为该路径不存在。
    所在位置 行:1 字符: 1
    + Remove-Item -WhatIf -Recurse "registry::HKEY_CLASSES_ROOT\Directory\s ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (HKEY_CLASSES_RO...nus\PowerShell6:String) [Remove-Item], ItemNotFoundEx
       ception
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    Remove-Item : 找不到路径“HKEY_CLASSES_ROOT\Directory\Background\shell\PowerShell6”,因为该路径不存在。
    所在位置 行:1 字符: 1
    + Remove-Item -WhatIf -Recurse "registry::HKEY_CLASSES_ROOT\Directory\s ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (HKEY_CLASSES_RO...ell\PowerShell6:String) [Remove-Item], ItemNotFoundEx
       ception
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
    Remove-Item : 找不到路径“HKEY_CLASSES_ROOT\Drive\shell\PowerShell6”,因为该路径不存在。
    所在位置 行:1 字符: 1
    + Remove-Item -WhatIf -Recurse "registry::HKEY_CLASSES_ROOT\Directory\s ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (HKEY_CLASSES_RO...ell\PowerShell6:String) [Remove-Item], ItemNotFoundEx
       ception
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    
  11. chucklu commented on Mar 20, 2020

    @chucklu
    ContributorAuthor

    maic (@maicWorkGithub) You could try to remove the context menu by Easy Context Menu 1.6.
    image
    select the context menu you want to remove, and click delete
    image

  12. chucklu commented on Mar 20, 2020

    @chucklu
    ContributorAuthor

    After installing PowerShell-7.0.0-win-x64.msi, the PowerShell preview 7.0 was uninstalled, but the context menu was kept.
    image
    Then I removed the context menu "PowerShell 7-preview" by Easy Context Menu 1.6.

  13. added
    Resolution-No Activity
    on Nov 16, 2023
  14. chucklu commented on Nov 16, 2023

    @chucklu
    ContributorAuthor

    manually remove the menu by Easy Context Menu 1.6.

  15. removed
    Resolution-No Activity
    on Nov 16, 2023
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

    WG-Maintainers-Build

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions