# Execute python script via .bat file

**URL:** <https://forum.inductiveautomation.com/t/execute-python-script-via-bat-file/17606>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [April 4, 2018, 8:26pm UTC](https://forum.inductiveautomation.com/t/execute-python-script-via-bat-file/17606 "2018-04-04T20:26:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![StepanenkoPaul](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@StepanenkoPaul](https://forum.inductiveautomation.com/u/StepanenkoPaul)\
**Post date:** [April 4, 2018, 8:26pm UTC](https://forum.inductiveautomation.com/t/execute-python-script-via-bat-file/17606/1 "2018-04-04T20:26:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![phillip.bow](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@phillip.bow](https://forum.inductiveautomation.com/u/phillip.bow)\
**Post date:** [April 4, 2018, 8:51pm UTC](https://forum.inductiveautomation.com/t/execute-python-script-via-bat-file/17606/2 "2018-04-04T20:51:15Z")

</div>

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:

```auto
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.
