# Client executing app on the server computer

**URL:** <https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610>\
**Category:** Ignition\
**Created:** [May 2, 2019, 6:41pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610 "2019-05-02T18:41:21Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 2, 2019, 6:41pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/1 "2019-05-02T18:41:21Z")

</div>

Hello!

I need to open an application with a button, but with a twist. I know that it can be done by using system.util.execute function. But it only works when the client that presses the button has the program installed. So… It would be great if some client could press the button from whatever machine he is on and then the app would open on the Server machine.

Is it possible to be done? If so, how?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [May 2, 2019, 7:08pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/2 "2019-05-02T19:08:14Z")

</div>

> [@carolineuchoa.estuda](#):
>
> I need to open an application with a button, but with a twist. I know that it can be done by using system.util.execute function. But it only works when the client that presses the button has the program installed. So… It would be great if some client could press the button from whatever machine he is on and then the app would open on the Server machine.

Are you just looking to make a script execute? or actually execute and view a program running on the server?

If its the first option, you probably just need to move the script somewhere that runs on the gateway, like a tag script or MessageHandler maybe.

If you actually want to interact with the program on the server, I'm not sure if there is a route to do that.

---

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 28, 2019, 12:45pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/3 "2019-05-28T12:45:51Z")

</div>

Sorry about the ignorance, but I’m trying to do this and I can’t make it work. What am I doing wrong here? The script does not fire.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/678f20a92005ed2e51f9e23c1588a3fb991440c1.png)

When I tried to add this script directly to the button, like this:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/884efa6a9b9bf36c6cf64dc816c08c1a7dabc13c.png)

I got an error saying that the system couldn’t find the specified application, but the path is correct.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [May 28, 2019, 12:54pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/4 "2019-05-28T12:54:17Z")

</div>

> [@carolineuchoa.estuda](#):
>
> When I tried to add this script directly to the button, like this:

Try adding double backslash in your path like shown below. Backslash is an escape character and can cause issues if used in a string literal.

```auto
system.util.execute(["C:\\Windows\\notepad.exe"])

```

As for the tag change script not executing, I'm not seeing anything obvious to me that might be causing it(other than the double slashes missing there) I would double check in the Gateway logs to see if there is any further error messages.

---

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 28, 2019, 1:16pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/5 "2019-05-28T13:16:07Z")

</div>

Yes, it was the double backlash! Thanks!

But now it’s oppening twelve notepads when I change from 0 to 1. Any clue why is this happening?

---

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 28, 2019, 1:18pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/6 "2019-05-28T13:18:18Z")

</div>

And the gateway tag change is still not firing 😕

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [May 28, 2019, 1:21pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/7 "2019-05-28T13:21:48Z")

</div>

> [@carolineuchoa.estuda](#):
>
> But now it’s oppening twelve notepads when I change from 0 to 1. Any clue why is this happening?

I would move the script away from property change and have it execute on 'actionPerformed' instead. I'm guessing there are more than one property change occurring when the button is clicked and that is why you are getting several notepad windows.

Can you post a screenshot for your tag change script settings(the configuration page for the tags not the script)?

---

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 28, 2019, 1:30pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/8 "2019-05-28T13:30:25Z")

</div>

You mean this settings?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/1e7b8dead67436fa34709887ed0795ed5f6a8c94.png)

---

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 28, 2019, 1:34pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/9 "2019-05-28T13:34:56Z")

</div>

There is also something odd happening on the Gateway, it isn’t showing any scripts:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/44ccd82a42c42fc8939059e8cb4872ea4c437e29.png)

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [May 28, 2019, 1:40pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/10 "2019-05-28T13:40:16Z")

</div>

Hmm it should show there, I would double check that the project has been saved.

But I am running some tests on my side and can’t seem to get system.util.execute to run at the gateway level. It doesn’t error and the script seems to execute successfully though. The documentation says it should work at all scopes, so I’m not sure what is missing.

---

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 28, 2019, 1:45pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/11 "2019-05-28T13:45:15Z")

</div>

I’ve saved multiple times to make sure it would work. Maybe I should reset the gateway?

Yes, that’s weird, it really doesn’t show any errors. Perhaps I’ll post again on the forum asking specifically about this issue.

---

<div class="post-metadata">

**Author:** ![bpreston](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bpreston](https://forum.inductiveautomation.com/u/bpreston)\
**Post date:** [May 28, 2019, 4:21pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/12 "2019-05-28T16:21:12Z")

</div>

What are you trying to accomplish by opening the program on the server? In your first post you mentioned that you could open it from the clients only if they had the program installed so you wanted to open it on the server. Why do you want to open it on the server? Does the client that opened it need to interface with it or does the program just need to do something in the background with no user interface?

As for your post about it not showing up as a gateway tag change script. Looking at your posts you originally had it in a gateway tag change script but the last time you showed your script you had it in a tag event script. That will not show up in your gateway scripts. If you want to monitor it in your gateway scripts you need to move it back to a gateway tag change script.

---

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 28, 2019, 4:26pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/13 "2019-05-28T16:26:18Z")

</div>

I just need to run a app that interacts with Ignition by itself (Labview executable), so the client doesn’t need to interact with that app. It all happens on the background. Client just has to run the .exe and everything is fine.

I’ve changed it back to the gateway scripts, that was when I noticed that the project I was designing wasn’t enabled, that’s why it wasn’t showing on the the gateway scripts.

But I think someone on my other post found the solution. I’m trying to solve it right now.

---

<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:** [May 28, 2019, 4:26pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/14 "2019-05-28T16:26:52Z")

</div>

Also, Windows will not allow any “background” service, no matter what user it’s running as, to open a foreground/GUI application like Notepad. Whatever program you want to run _must_ run self-contained without any user interaction.

---

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 28, 2019, 4:34pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/15 "2019-05-28T16:34:07Z")

</div>

The actual program I want to run is a Labview executable. Without user interaction needed.

---

<div class="post-metadata">

**Author:** ![carolineuchoa.estuda](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@carolineuchoa.estuda](https://forum.inductiveautomation.com/u/carolineuchoa.estuda)\
**Post date:** [May 28, 2019, 4:50pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/16 "2019-05-28T16:50:24Z")

</div>

@paul-griffith do you know anything about this?

Someone more familiar with Windows might know if there’s a way to change that. I seem to remember there be a setting about allowing the service or service user to interact with the desktop?

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [May 28, 2019, 5:18pm UTC](https://forum.inductiveautomation.com/t/client-executing-app-on-the-server-computer/24610/17 "2019-05-28T17:18:31Z")

</div>

[http://forum.inductiveautomation.com/t/system-util-execute-on-the-gateway-scope/25358/5](http://forum.inductiveautomation.com/t/system-util-execute-on-the-gateway-scope/25358/5)
