How to open windows application from ignition?

Good afternoon,

What would be the script if I wanted to open a windows program (for example skipe).

I have to link this action to a button on the scada.

Thank you

1 Like

Take a look at system.util.execute.

2 Likes

You need to be careful as system.util.execute will launch new instances of the application each time.
We found this after having over 100 calculators open in the background :open_mouth::sweat_smile:

So we now issue a taskkill before the launch.

import time
system.util.execute(["taskkill","/f","/im","calc.exe"])
time.sleep(.5)
system.util.execute(["calc.exe"])

4 Likes

What if it is not a default windows app like for example -

C:\Program Files\uvnc bvba\UltraVNC.

Just pass it the full path to the exe

This should open each file or application exactly how the OS would.

import subprocess

subprocess.Popen(["C:\\Shared Gateway\\IgnitionTagHistory.pdf"],shell=True)
subprocess.Popen(["C:\\Program Files (x86)\\Google\\\Chrome\\Application\\chrome.exe"],shell=True)
1 Like

thanks for your answer

I didn’t notice the double backslash at first. That should have been in the manual.

Thank you samngeru. This is exactly what I needed.

1 Like

No problem.

This works fine for vision, how to open this from perspective.

You can't.
Allowing a browser to launch an OS application would be a major security flaw and therefore the functionality doesn't exist.

3 Likes

The closest you can get is to have an application pre- installed on the client machine that registers a custom URL protocol handler that opens that application. Similar to the way mailto:someEmailAddress?subject=someSubject launches Thunderbird on my workstation and starts creating a new message with that information.

(This is coming in v8.3 to launch Vision, Perspective Workstation, and Designers.)

1 Like