Run unix executable file from Unity

Dear forum

I have a unix executable file that I need to run from Unity. I also need to pass it arguments. Is this possible?

Best
~ce

You can use the .net class Process

Process process = new Process();
process.StartInfo.FileName=command;
process.StartInfo.Arguments = arguments;			
process.StartInfo.RedirectStandardError=true;
process.StartInfo.RedirectStandardOutput=true;
process.StartInfo.CreateNoWindow=true;
process.StartInfo.WorkingDirectory=Application.dataPath+"/..";
process.StartInfo.UseShellExecute=false;
process.Start();

You can find details of the usage on msdn: Process Class (System.Diagnostics) | Microsoft Learn

This doesn’t work in the webplayer.

Bye, Lucas

Thanks Lucas, that is just what I needed.
~ce

function OnTriggerEnter  (other : Collider) {
Process note = new Process();
note.StartInfo.Arguments = Application.dataPath+"/test.txt";
note.Start(notepad.exe);
}

This just says a semicolon is missing for me.

This launches notepad, though:

function OnTriggerEnter  (other : Collider) {
System.Diagnostics.Process.Start("notepad.exe");
}

I guess I am instantiating it incorrectly

You’re trying to use C# syntax in Javascript.

var note = new Process();

–Eric

How can I write a text file with the data from my game in Unity, and, after write the file, make Unity Open the Notepad.exe with the file? (Is something like a report system that I’ll need to print, because this I want to work with notepad).

Can be Done in JavaScript or only in C#? Can you help me?