System.util.execute not working

I can’t get system.util.execute to do anything. When I run system.util.execute([‘notepad.exe’, ‘c:\program files\inductive automation\ignition\license.txt’]) like the example I don’t get any errors but nothing happens. I made sure that the “Allow service to interact with desktop” option was checked. I also made sure that the file existed using system.file.fileExists() and it returned true. What am I doing wrong?

Because Ignition runs as a service I don’t think it’s possible for code running in gateway scope (tags, perspective) to open a GUI window even with “interact with desktop” enabled.

1 Like

this might be redundant but would it be possible to run a .py file from the execute command (its python 3.6) if it isn’t opening anything

My experience outside of Ignition with running .py files from within a service is that they run fine, you just, as stated, won’t see anything on the display.

The other issue here, of course, is that notepad would open (if this indeed did work) on the gateway server, not the client, since all scripts in Perspective run on the server.

4 Likes