1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
private String executeProcess()
{
Dictionary<string, string> environmentVariables = getArtixEnvironment();
ProcessInvocation process = this.ProcessInvocation;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
foreach (string variableName in environmentVariables.Keys)
{
process.EnvironmentVariables.Remove(variableName);
process.EnvironmentVariables.Add(variableName, environmentVariables[variableName]);
}
// May through ProcessorLaunchException - propagate those up
process.Start();
proces.StartInfo.RedirectStandardOutput = true;
String outStreamOutput = process.StandardOutput.ReadToEnd();
return outStreamOutput;
} |
Partager