cmdcrashanacondauninstallation

Cmd crashes with exit code 1 after uninstalling anaconda


Problem description

I got this problem in my Win10 Pro Machine. I uninstalled Anaconda because it gaves me problem with Jupyter notebook and reinstalled it. But since then I'm unable to access Command Prompt.

As soon as I open it it closes. I figure it out opening VSCode and reading Cmd has exited with error code 1. And now nor Anaconda Prompt is starting up, but as soon as I open PowerShell it's says (conda) so I think it works from there.

powershell and cmd /d

From Powershell if i type in cmd and it exit immediately without complaining about anything. But if I type cmd /d it works.

Tried fix that didn't work

Infomation i found online

According to this website ErrorCode 1 'Indicates that Action has attempted to execute non-recognized command in Windows command prompt cmd.exe'.

Actual request

Can anyone help me with this issue please? I tried to look online for a week but with no luck, thank you for your time


Solution

  • The following answer was (supposedly) initially posted (but later removed) by @Mofi and I got it from the comment of @filippo-vicari. So all credits go to them, thanks for solving this issue! It took me hours to finally find their solution.

    Enter the following command into the still working powershell (in my case Anaconda Powershell):

    C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f
    

    It worked for me immediately. cmd.exe and Anaconda Prompt now work flawlessly again!