Yes, you can create a similar functionality for starting Miniconda (or any Conda environment) in the current directory from the Windows Explorer address bar. Here's how you can set it up:
-
Create a shortcut to the Miniconda prompt:
- Navigate to the Miniconda installation directory (typically
C:\Users\<YourUsername>\Miniconda3 or C:\Miniconda3).
- Find the
condabin folder.
- Look for the
conda.bat file.
- Create a shortcut to
conda.bat on your desktop (right-click and select "Create shortcut").
-
Modify the shortcut properties:
-
Create a system-wide command or context menu entry:
- To invoke this shortcut from anywhere, you can create a system-wide command or add an entry to the context menu.
- For a system-wide command, you can add the folder containing your shortcut to the system PATH, and rename the shortcut to something easy to remember, like
miniconda.
To add a context menu entry for Miniconda, you can add a registry key. Be very careful when editing the registry, as incorrect changes can cause system instability.
Here's how to add a context menu entry:
-
Open the Registry Editor by typing regedit in the Start menu and pressing Enter.
-
Navigate to the following key for directory context menus:
HKEY_CLASSES_ROOT\Directory\Background\shell
-
Right-click on shell, choose New > Key, and name it Open Miniconda Here.
-
Right-click on your new key (Open Miniconda Here), choose New > Key, and name it command.
-
With command selected, in the right pane double-click the (Default) value.
-
Enter the following command (adjust the path to match the location of your conda.bat):
cmd.exe /k "C:\Users\<YourUsername>\Miniconda3\condabin\conda.bat activate && cd %V"
-
Close the Registry Editor.
After this, you should be able to right-click within a folder (or the white space within a folder) and see an option that says "Open Miniconda Here". Selecting this option will open a Miniconda prompt in that directory.
Please substitute <YourUsername> with your actual username and adjust the paths according to your Miniconda installation.
Important: Editing the Windows registry can have unintended side effects. Always back up the registry before making changes and proceed with caution. If you're not comfortable with this, it's best to consult with someone who has experience with Windows system administration or look for alternative methods such as batch scripts or third-party extensions that provide similar functionality without directly editing the registry.