Execute Windows Command from Ignition Perspective

I would like to know if there’s a way to execute a Windows command from Ignition using Perspective.
My goal is to open the on-screen keyboard (the command is osk) by pressing a button.

But it doesn’t work when I try to embed it within Perspective using system.util.execute.

Any ideas or suggestions?

You are attempting to launch the OSK, but you're launching it on the server, not the client.
You will never get commands to run on the client from perspective.
This is why all the forum posts about OSK with perspective are about the OS triggering it to pop up at the correct time.

A website that can launch arbitrary native executables is indistinguishable from malware. In other words: browsers deliberately do not expose this capability.

The closest thing you can do is use deep linking/custom URL protocol handlers (arranged in advance on your client machines), but it is not a general purpose solution.

Perspective Workstation has (some) built in support for using the operating system's built in keyboard as well, and some folks have posted guides on setting up bespoke Linux "kiosk" type setups with embedded browsers that have better luck for the specific problem of "get me an OSK for my Perspective session".

4 Likes

Would IA ever investigate developing some sort of application that would create the URL protocol handler, or is it solved already by other readily available software? I’m imagining something like ignclient://gateway:port/script/myscript.whatever that could run a basic jython script on the client, or grab whatever script it needs to run from the gateway and execute on the client. I suspect I’m missing some glaringly obvious issues though, but would be interested to hear if IA can think of a way of making it work somewhat natively in ignition.

It cannot be generic, or it is as big a security hole as letting the browser do it.

The launchers in Ignition v8.3 do install such URL handlers for launching those applications with tightly controlled arguments.

Any entity that creates a generic URL handler that runs arbitrary scripts will be targeted by all of the anti-malware vendors on the planet, and will be blackballed by all the serious purchasing managers on the planet.

If you need to run gateway-dictated scripts in the client environment, Use Vision. Full stop.

6 Likes

Besides Phil's overall point, we have talked internally about a way for Perspective Workstation to offer some kind of "local" scripting affordance - but it's a really valuable part of Perspective's security model that it doesn't give you that capability. Anything we come up with will have to be able to be limited in some way (or even prevented entirely) by the local machine, precisely because of security.

Such a thing will almost certainly never come to the mobile apps, and literally cannot come to browser based sessions - so it will always be a limited scope utility, not a general "escape hatch" as scripting in Vision has turned out to be (for better and for worse).

2 Likes