Open a external program

Im doing a unity project.I want to open a external program while running the unity project. I’ve searched and I can open a external program. But I got a problem is about the path. This is my path “C:/Users/xiongzhou/Documents/MP_SIP_Unity_Project/Assets/mjpeg-player/sample2.html”, but when I use another computer to run this project , it just cannot open already. How can I run a program in the project folder its own for any computer.

You can use:

Application.OpenURL ((Application.dataPath) + "/mjpeg-player/sample2.html");

Where, if you copy the mjpeg-player-folder to your builds data-folder, it’ll also work at runtime.

You can also use (for other filetypes - to more fit the answer to the topic):

System.Diagnostics.Process.Start(Application.dataPath + "/theApplication.exe");
//or directly to open external programs:
System.Diagnostics.Process.Start("notepad.exe");

This will as expected not work for the Web Player due to security reasons.

How does one terminate this process on Application quit?
… The starting works, tho my external “client” does not have a function to quit…
Do I have to create one in my client and send a message over the server of is Unity actually capable of closing the process it opened?

Simply put the external application in the assets folder to your unity project

Hi, I want to be able in my program to select de path of the other exe file and see the application image. How should I do that? Is that possible? Can you help me?