The path is perfectly fine, (I checked it with Debug.Log) but the cmd just pops out for 1 millisecond (or less). I tried everything, but this is not working for me.
Are you trying to open a Command prompt, or an excecutable file? This works fine for me:
void Start () {
Process p = new Process();
p.StartInfo.UseShellExecute = true;
p.StartInfo.FileName = "C:\\Windows\\System32\\cmd.exe";
p.Start();
}
You could try passing “pause” as one of the arguments to see if there’s any errors in the cmd window. Though I’m not too sure if that would work.
I am trying to open the exe file, but it’s not opening. It has to create a qemu virtual machine that opens a VNC server. I can start it from anywhere, but this approach is not working. (The -pause argument do nothing.)
“/…/qemu-system-x86_64.exe’ is not recognized as an internal or external command,
operable program or batch file.” I think my bat file is not working. Oh, how can I point to that exe? It’s one folder up.