private string RunCommand(string cmd, string args)
{
Process proc = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo(cmd);
startInfo.Arguments = args;
startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardInput = false;
startInfo.RedirectStandardError = true;
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = false;
proc.StartInfo = startInfo;
proc.Start();
string output = proc.StandardOutput.ReadToEnd();
proc.WaitForExit();
proc.Close();
return output;
}