Search code examples
pythoninstallationanacondawindows-10visual-studio-2019

Finding Anaconda's directory in Windows 10 through an installer created with Visual Studio's Setup Project plugin


I'm making an installer for Windows 10 that installs some files within Anaconda's installation path. For this, I'm using Visual Studio (2019 -- version 16.9.4) and the Setup Project plugin (version 0.9.9). I have added a "Registry Launch Condition" following the instructions explained here (that I found after reading this post) so that the installer finds Anaconda's directory automatically, without having to assume the Anaconda's default installation path (given here).

For the installer, I have managed to create a registry search condition and link it to the files that are to be installed in such a way that if the search fails then the installer prompts an error message (that I know how to edit).

I haven't managed, however, to introduce a proper "RegKey" to find anaconda in the registry. As a matter of fact, I don't even know how to find Anaconda in the Windows' Registry Editor app.

Question 1: What is (are) the registry key (keys) related to Anaconda?

I can't find this answer anywhere. I need a registry key that gives me Anaconda's root directory,

C:\...\Anaconda3

or any other of these paths

C:\...\Anaconda3\Lib
C:\...\Anaconda3\Lib\site-packages

Question 2: If the only registry key entry available does not give any of these three paths (listed above) but rather some other path within Anaconda's root directory, then how can such a path be modified to get one of those three listed above?

Thank you all! :)


Solution

  • I'll answer this question so that others have the chance to solve, if not the same, similar issues. I managed to find what I was looking for by searching folder by folder the registry via the registry editor app. The registry key that I need is displayed on the bar below the dropdown menus "File", "Edit", .... You just need to remove the Computer\HKEY_CURRENT_USER\ and keep the rest SOFTWARE\Python\ContinuumAnalytics\Anaconda38-64\InstallPath. This, I believe, if anaconda was installed with python 3.8.