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

AddToPath parameter doesn't work on installer Anaconda3-2022.05-Windows-x86_64 #12995

Closed
4 tasks done
velden opened this issue Jul 18, 2022 · 2 comments
Closed
4 tasks done
Assignees
Labels

Comments

@velden
Copy link

velden commented Jul 18, 2022

Checklist

  • I added a descriptive title
  • I searched for other issues and couldn't find a solution or duplication
  • I already searched in Google and didn't find any good information or help
  • I looked at the docs and didn't see anything to help

What happened?

Following documentation on https://docs.anaconda.com/anaconda/install/silent-mode/ and using same process as on previous version(s) we try to install Anaconda and let it add its paths to the path environment variable. It doesn't seem to work

Snippet from the script we use to install it:

:: set installation path
set installPath=C:\Anaconda3-2022.05

:: default installation
start /wait "" .\Anaconda3-2022.05-Windows-x86_64.exe /InstallationType=AllUsers /AddToPath=1 /RegisterPython=1 /S /D=%installPath%

Command window is run as administrator.
Expected behavior: after installation and opening a new cmd window, set path should show added entries related to Anaconda.

The path environment variable seems untouched at all.

Conda info

No response

Conda config

No response

Conda list

No response

Additional Context

No response

@pseudoyim pseudoyim self-assigned this Jul 18, 2022
@pseudoyim
Copy link
Contributor

pseudoyim commented Jul 18, 2022

Hello @velden

Yes, as of Anaconda Distribution 2022.05 and Miniconda-4.12.0, we disabled the option to AddToPath when running the installation for AllUsers. We did this to address CVE-2022-26526, which describes a security risk that was found when allowing the system PATH to be edited when running the installation in AllUsers mode. The AddToPath is still an option if you run the installation in JustMe mode.

We recommend the following workarounds:

  • You could run the installation in JustMe mode.
  • If you wish to continue using the AllUsers mode, you could remove the /AddToPath=1 parameter from your command and add the installation path to your PATH in a separate step after the installation completes.
  • Since the AddToPath for AllUsers option was disabled in Anaconda Distribution 2022.05, you could just stick to installing an older version in order to keep using the option to AddToPath when installing for AllUsers. After the installation completes, you could then try to install an updated anaconda metapackage.

Another user ran into a similar issue recently; please see this issue thread for more information.

We have updated the documentation page you referenced so that other users can find this information more easily going forward.

@velden
Copy link
Author

velden commented Jul 19, 2022

Perfect.
Thanks for the prompt reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants