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.

3 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)

2 Likes

Sorry i'm replying to an year old post. I have a project that calls an external vbs file. Yup it works fine with Vision. However, i want to use this project in an iphad. 8.1 doesn't allow for mobile app correct? @pturmel any ideas for me to use this in an ipad. Should i go back to 7.9 and try to create this project?

Nothing from Ignition will run any such external script locally on a mobile device. Not even in v7.9. Sorry.

1 Like