I have a file, startup.bat that, among other things, launches a few apps, including Anki. I have two problems.
- I want the bat file to start Anki and not wait for it to terminate. The only command I have found that will do this is:
start /min cmd /c start C:\Progra~1\Anki\Anki.exe
which is ridiculously complicated compared with any other app. Other combinations of start, cmd and call do not return control to the bat file until Anki terminates.
- Anki sometimes becomes invisible. The process is still there in Task Manager but there is no window. If I try to relaunch it, the new instance detects the old instance and terminates, leaving just the old, invisible process. I have to
taskkill /im anki.exe /f
in my bat file to kill off any invisible process before launching it.
These problems aren’t specific to running from a bat file, they also happen in an interactive Command Prompt window. Launching Anki from the GUI by double-click works as expected.
I’m posting this in the hope that someone can explain what’s going on and in case it helps anyone else.
Window 10
Version 24.06.3 (d678e393)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1