I am trying to run a python program with an anaconda environment (or just a python with some version) through wscript, which will be placed in a batch file, so I can run the program by just double clicking the batch file.
here is the code
Set WinScriptHost = WScript.CreateObject("WScript.Shell")
WinScript.Run "C:\anaconda3\envs\card_player\python.exe C:\projects\card_player\auto_play.py"
Set WinScriptHost = Nothing
I have no idea why it is not working, meanwhile, run the python is perfectly working by
python c:\projects\card_player\auto_play.py
in the console.
What did I wrong? A console pops up and disappears right away after I click the batch file...