Executing an external application from Ignition Perspective View

I added this to a button onclick event, but nothing happens:

def runAction(self, event):
system.util.execute(['notepad.exe', 'c:\program files\inductive automation\ignition\license.txt'])

Note: the system.util line is indented per python requirement.

I want to eventually call another program if I can get this example one to work.

Thanks for your help!

You simply cannot do this with Perspective. It is security violation for a browser to launch any real application on the client machine.

On top of that, all scripts in Perspective run on the gateway, not in the browser. So your script is trying to open notepad.exe in the gateway, in the background service where there's No UI at all.

If you absolutely have to be able to do this sort of thing, you need to use Vision, not Perspective.

2 Likes

You could install an uri, but that means you have to install it on every clients pc (that needs this feature)
i have an example that can opens files (on windows)

1 Like