What happened
I re-installed the anaconda on the good shinning day.
After installation, I run
conda init
to startup the conda environment.
Then, I found everything in my build is messed up. The cmd always complain about there are not supposed to be a "&" symbol. As a result, all the commands using the cmd is dead.
Finally, I find out the reason is the conda has changed the regedit key of
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
into
if exist & if exist
It is definitely wrong. After delete the bug string. Everything is just fine.
My Mistake
I admit I was wrong to run the command, the correct command should be
conda init powershell
or
conda init cmd.exe
to install the anaconda environment in Win10.
My Question
My question is in two folders,
- Why the anaconda messes my regedit key like that?
- Why can't I reproduce the bug after that?
Can anyone help?
My Advice
If your cmd is broken too in the future, you can check the regedit for a quick debug.
conda init --help
says "shells One or more shells to be initialized. If not given, the default value is 'bash' on unix and 'cmd.exe' on Windows." – Unclose