Execute python script via .bat file

I have a .bat file in which the python script is called. If i just run the bat file from windows, it executes the script. If i try to run the bat file via ignition, the script is not executed.
i tryed create next bat file:

notepad
python C:\scripts\temp.py
calc

notepad and calculator are runned. which means that the bat file is working, but the ignition can not run the python script. What can be and how to fix it?

I use Windows 7, python 2.7

Where is Python installed, and have you tried putting in the full path to python.exe in your bat file? Depending on how you run Ignition, python.exe might not be in the system path to be called without the full location referenced.

… or Python is installed to a user dir, and the Ignition service doesn’t have access to read that directory.

One more test might be to change the line to:

python c:\scripts\temp.py > c:\scripts\temp_output.txt

Then check that file after executing the bat file to see the response logged when it tries to execute.

1 Like