I’m trying to open an application on the Gateway scope, using Gatway Tag Change Script. What I need is to change a button to 1 and then it opens notepad, but I need it to be on the Gateway.
The script doesn’t show any erros, the wrapper.log doesn’t show any errors, and the script still doesn’t fire. The project is saved, so that’s not the issue.
That’s my script:
Anyone has a clue of why it is not firing? I’ve posted about it before and the guy that tried to help me couldn’t make it run either. I’ve read that system.util.exec works on all scopes, but when I run the very same script on a button actionPerformed event, it runs perfectly. It looks like system.util is not working on the gateway scope. Anyone has any ideas?
Thanks in advance!
The gateway runs as a service, and services or service users probably aren’t allowed to spawn GUI processes by default.
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?
If I understand correctly (also from reading your other post), you want to execute a program from client, but program is installed on the server, not on the client.
I’ve done this in the past:
- the program you want to run, must be in the shared folder on the server
- if the server and the client aren’t on the same domain, then on the server you must create a user which you are using on the client (same name and password)
- the user must have read (and write if you need) rights on the shared folder
You can test if everything is OK like this:
- on the client PC open File Explorer and go to the network and open the server
- the shared folder must be showing and inside must be your app.exe.
- double click on the exe file
This was my code (on the button actionPerformed) for running the program on the server from client:
system.gui.errorBox("Error running the app from the server!")
The IP address is the server IP, because my client doesn’t have DNS server defined…
Thanks for your response.
There is an already existant shared folder between the Server and the Clients at my company. What I did was copy notepad to this shared folder and try to execute it as you told.
But when I press the button it kind of gets ultra delayed (loading circle) and doesn’t open any programs. No errors was shown. Maybe it is the issue of services not being able to interact with the desktop, as Kevin mentioned?
That means that user on the client doesn’t have necessary permissions on the shared folder.
When you do it this way then Ignition service doesn’t interact with the program. Your client is…
Until you can’t execute/run the program from File Explorer/Network/server/sharedFolder, you can’t run it from client with system.util.execute…