I'm trying to create a batch script to activate a conda environment and start an application within it (which has been previously installed). But for whatever reason, the application doesn't start but the batch script itself restarts again and again.
I'm using the following script:
@ECHO OFF
ECHO Activate Environment ...
call activate ENV
ECHO Start application ...
ApplicationName
PAUSE
The output if I start the batch script by doubleclicking it is:
Activate Environment ...
Start application ...
Activate Environment ...
Start application ...
Activate Environment ...
Start application ...
I also tried with call ApplicationName
and start ApplicationName
but this doesn't work either. The application I would like to start is an own application which can be installed via pip (Python application, entrypoint specified in setup.py).
The normal use is to open a cmd or the Anaconda prompt, activate the environment manually and enter the command ApplicationName
on the command line. After this the application triggers a browser window to open a login screen. When I use the application like that the command line window stays open during the execution of my application and prints debug messages.
I just don't understand why the commands are repeated again and again instead of that the application is started. Do you know what causes the behaviour?
Thank you in advance for an answer! Best Regards
Your batch file has the same name as your undisclosed ApplicationName.
Therefore the batch file will restart ApplicationName.bat
instead of ApplicationName.exe