I need to be able to run a cmd file that then behaves like a anaconda prompt. Conda is installed in user profile without admin rights and hence is not on the PATH.
So what I did is copy the shortcut of the anaconda prompt and try with that:
%windir%system32cmd.exe "/K" C:UsersmyuserAppDataLocalmambaforgeScriptsactivate.bat C:UsersmyuserAppDataLocalmambaforge
running this in a open cmd window works and I can then activate the target environment. However when running this inside a .cmd file, it works but then execution stops and my environment is not activated.
The entire cmd file is:
%windir%system32cmd.exe "/K" C:UsersmyuserAppDataLocalmambaforgeScriptsactivate.bat C:UsersmyuserAppDataLocalmambaforge
conda activate myenv
do something
The activation never happens, command just stops but there is also no error message.
So how I can get conda to activate when executing a cmd file?