PetrasVestartasEPFL
PetrasVestartasEPFL

Reputation: 596

Run executable in a silent mode

I am executing .exe file in C# using the code below. If I want to run executable in a silent mode I usually uncomment UseShellExecute and RedirectStandardOutput properties, but this gives me an error:

Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified

If I keep a code like this it runs, but the additional command line screen is popping up and closing. I am running Poisson Surface Reconstruction .exe and wondering if the silent mode is possible or not? Or it must be implemented by author who did this executable?

var proc = new System.Diagnostics.Process {
        StartInfo = new System.Diagnostics.ProcessStartInfo {
            FileName = "PoissonRecon",
            Arguments = "--in " + fileNameIn + " --out " + fileName + " --depth "+depth.ToString()+" --pointWeight 0 --colors",
            //UseShellExecute = false,
            //RedirectStandardOutput = true,
            CreateNoWindow = true,
            WorkingDirectory = filePath
        }
    };

    proc.Start();
    proc.WaitForExit();

Upvotes: 0

Views: 219

Answers (1)

Ihor
Ihor

Reputation: 1

Try adding to arguments line this: "--mode unattended" if I'm not mistaken it should make installation silent

Upvotes: 0

Related Questions