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.