|
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
namespace svcutil2
{
public class Utils
{
public static void RunExe(string path, string[] args)
{
var startInfo = new ProcessStartInfo();
startInfo.FileName = path;
startInfo.Arguments = @"""" + String.Join(@""" """, args) + @"""";
startInfo.RedirectStandardOutput = true;
startInfo.UseShellExecute = false;
var p = Process.Start(startInfo);
p.WaitForExit();
var log = p.StandardOutput.ReadToEnd();
Console.WriteLine();
Console.WriteLine(log);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.