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.
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.
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.
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)?
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.
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.
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.
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.