# Help system.util.sendRequest to run .exe in Gateway

**URL:** <https://forum.inductiveautomation.com/t/help-system-util-sendrequest-to-run-exe-in-gateway/110113>\
**Category:** Ignition\
**Tags:** perspective, vision, scripting\
**Created:** [August 22, 2025, 2:51pm UTC](https://forum.inductiveautomation.com/t/help-system-util-sendrequest-to-run-exe-in-gateway/110113 "2025-08-22T14:51:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryanbelcher9](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bryanbelcher9](https://forum.inductiveautomation.com/u/bryanbelcher9)\
**Post date:** [August 22, 2025, 2:51pm UTC](https://forum.inductiveautomation.com/t/help-system-util-sendrequest-to-run-exe-in-gateway/110113/1 "2025-08-22T14:51:30Z")

</div>

I am trying to have a project script run a .exe on the gateway and then return the results to the client project script. If running the .exe in a similar manner on the client, it works just fine. Here I need the .exe to run on the gateway. The .exe is on the gateway C drive with GatewayLocalDir pointing to it.

Here is the Gateway Message Handler:

```python
def handleMessage(payload):
    import subprocess
    try:
        path = payload["path"]
        process = subprocess.Popen([path], stdout=subprocess.PIPE)
        output, _ = process.communicate(timeout=10)
        return output
    except Exception as e:
        return str(e)

```

Here is a snippet of the project’s script:

```python
try:
    import base64
    from java.io import ByteArrayInputStream
    from javax.imageio import ImageIO

    payload = {"path": GatewayLocalDir}
    result = system.util.sendRequest("Gateway", "runLabelGenHandler", payload)
                
    image_bytes = base64.b64decode(result)
    input_stream = ByteArrayInputStream(image_bytes)
    return ImageIO.read(input_stream)

```

In the end, it’s not returning an image and failing the try. Please help

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 22, 2025, 3:37pm UTC](https://forum.inductiveautomation.com/t/help-system-util-sendrequest-to-run-exe-in-gateway/110113/2 "2025-08-22T15:37:41Z")

</div>

The most likely cause is that the Ignition gateway _service_ is not running as a user with access to that location, or cannot run the executable for some other permissions related reason.

You can have the Ignition service run as a particular user, or you can grant the `LOCAL_SYSTEM` virtual user explicit access to the folder/executable you're trying to invoke.

---

<div class="post-metadata">

**Author:** ![bryanbelcher9](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@bryanbelcher9](https://forum.inductiveautomation.com/u/bryanbelcher9)\
**Post date:** [August 22, 2025, 5:19pm UTC](https://forum.inductiveautomation.com/t/help-system-util-sendrequest-to-run-exe-in-gateway/110113/3 "2025-08-22T17:19:10Z")

</div>

When granting Everyone Read/Write access to the .exe, it still seems to not be returning an image as it should. Do you know if LOCAL SYSTEM explicitly needs to be added? Thank you
