I'm trying to run a terminal cmd in osx Here's the code I'm using:
public Process process;
process = new Process();
process.StartInfo.FileName = "/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal";
process.StartInfo.UseShellExecute = true;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
process.StartInfo.Arguments = "screencapture screen.jpg";
process.Start();
It's supposed to take a screenshot of the entire desktop.
The result is that a terminal opens but nothing happens -- no commands are typed into the terminal. I have used this with ffmpeg before and it worked fine as long as you state the path correctly.
↧