Skip to content
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

Uninstall fails to remove command line integration leaving broken registry in Windows 10/11 #571

Closed
2 tasks done
AngusMaiden opened this issue Sep 9, 2022 · 2 comments
Closed
2 tasks done
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@AngusMaiden
Copy link

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

The installer/uninstaller for Miniconda3-py39_4.12.0-Windows-x86_64 seems to be broken. When uninstalling Miniconda which has been installed using this package (through Windows 10/11's "Programs and Features") it fails to completely remove the command line integration.

It throws an installation error (see screenshot below) and then leaves an orphaned reference in the Autorun registry key which breaks the command line on the system.

The Registry key that is left broken is: 'Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor\AutoRun' with the value 'if exist & if exist'. One has to manually delete this key to restore command line interface functionality or everytime the command shell runs there is the error '& was unexpected at this time'.

image

Conda Info

active environment : base
    active env location : C:\Users\angus\miniconda3
            shell level : 1
       user config file : C:\Users\angus\.condarc
 populated config files :
          conda version : 4.12.0
    conda-build version : not installed
         python version : 3.9.12.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\angus\miniconda3  (writable)
      conda av data dir : C:\Users\angus\miniconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\angus\miniconda3\pkgs
                          C:\Users\angus\.conda\pkgs
                          C:\Users\angus\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\angus\miniconda3\envs
                          C:\Users\angus\.conda\envs
                          C:\Users\angus\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.12 Windows/10 Windows/10.0.19044
          administrator : False
             netrc file : None
           offline mode : False

Conda Config

No response

Conda list

# packages in environment at C:\Users\angus\miniconda3:
#
# Name                    Version                   Build  Channel
brotlipy                  0.7.0           py39h2bbff1b_1003    defaults
ca-certificates           2022.3.29            haa95532_1    defaults
certifi                   2021.10.8        py39haa95532_2    defaults
cffi                      1.15.0           py39h2bbff1b_1    defaults
charset-normalizer        2.0.4              pyhd3eb1b0_0    defaults
colorama                  0.4.4              pyhd3eb1b0_0    defaults
conda                     4.12.0           py39haa95532_0    defaults
conda-content-trust       0.1.1              pyhd3eb1b0_0    defaults
conda-package-handling    1.8.1            py39h8cc25b3_0    defaults
console_shortcut          0.1.1                         4    defaults
cryptography              36.0.0           py39h21b164f_0    defaults
idna                      3.3                pyhd3eb1b0_0    defaults
menuinst                  1.4.18           py39h59b6b97_0    defaults
openssl                   1.1.1n               h2bbff1b_0    defaults
pip                       21.2.4           py39haa95532_0    defaults
powershell_shortcut       0.0.1                         3    defaults
pycosat                   0.6.3            py39h2bbff1b_0    defaults
pycparser                 2.21               pyhd3eb1b0_0    defaults
pyopenssl                 22.0.0             pyhd3eb1b0_0    defaults
pysocks                   1.7.1            py39haa95532_0    defaults
python                    3.9.12               h6244533_0    defaults
pywin32                   302              py39h2bbff1b_2    defaults
requests                  2.27.1             pyhd3eb1b0_0    defaults
ruamel_yaml               0.15.100         py39h2bbff1b_0    defaults
setuptools                61.2.0           py39haa95532_0    defaults
six                       1.16.0             pyhd3eb1b0_1    defaults
sqlite                    3.38.2               h2bbff1b_0    defaults
tqdm                      4.63.0             pyhd3eb1b0_0    defaults
tzdata                    2022a                hda174b7_0    defaults
urllib3                   1.26.8             pyhd3eb1b0_0    defaults
vc                        14.2                 h21ff451_1    defaults
vs2015_runtime            14.27.29016          h5e58377_2    defaults
wheel                     0.37.1             pyhd3eb1b0_0    defaults
win_inet_pton             1.1.0            py39haa95532_0    defaults
wincertstore              0.2              py39haa95532_2    defaults
yaml                      0.2.5                he774522_0    defaults

Additional Context

The error only appears to be happening with Conda when installed using Miniconda3-py39_4.12.0-Windows-x86_64 (Python 3.9 version). I've tested it with Miniconda3-py38_4.12.0-Windows-x86_64 (Python 3.8) and there is no installation error.

Furthermore, whilst reproducing the error to get the screenshot for this issue, I still received the installation error shown in the screenshot however the AutoRun registry key was instead left as "if exist" which doesn't appear to break the command line anymore. I'm not sure under what conditions the registry keys are left in these different states, maybe it has something to do with me installing and uninstalling Python 3.8 and 3.9 versions of Miniconda multiple times to gather information for this issue?

In any case, this can cause serious system instability if left unchecked due to it breaking the command line interface on the whole system and corrupting the registry. I frequently install miniconda on clients' computers as a convenient way of running python scripts and without knowing the details of this error and that I have to do some extra registry cleanup after uninstalling, it could be disastrous and leave their systems inoperable.

There is a similar issue reported in Issue conda/conda#10110 but it is for the chocolately installation of a different version.

This is my first issue report on GitHub (of anything, not just Conda) so please let me know if you need more info.

@AngusMaiden AngusMaiden added the type::bug describes erroneous operation, use severity::* to classify the type label Sep 9, 2022
@travishathaway
Copy link
Contributor

Hi @AngusMaiden,

Thanks a lot for your detailed bug report. This is in fact a known issue that we currently have a fix for. Check out this pull request in the conda/constructor for more information:

Just FYI, conda constructor is the project that is actually responsible for creating these installers.

This will take a little bit of time before the new versions of these installers are uploaded to https://docs.conda.io/en/latest/miniconda.html, but thanks to your issue (and others' as well) we now have a greater appreciation for the urgency of this problem and will be working as quickly as possible to remediate it.

In the meantime, I will be closing this issue as this is not directly related to this specific part of the conda project. If you experience further issues with installer/uninstaller, please create a new issue in conda/constructor.

@travishathaway travishathaway transferred this issue from conda/conda Sep 13, 2022
@AngusMaiden
Copy link
Author

Thanks @travishathaway for your reply. Great to know this is getting fixed :)

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Sep 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

No branches or pull requests

2 participants