fix utility elevation

This commit is contained in:
Chris Forbes
2011-02-07 18:50:13 +13:00
parent e2af08f812
commit 23c0524738
2 changed files with 4 additions and 4 deletions

View File

@@ -10,6 +10,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.IO.Pipes;
using System.Security.AccessControl;

View File

@@ -137,7 +137,8 @@ namespace OpenRA.Utility
string pipename = Util.GetPipeName();
var p = new Process();
p.StartInfo.FileName = "OpenRA.Utility.exe";
p.StartInfo.Arguments = command + " --pipe=" + pipename;
p.StartInfo.Arguments = command + " --pipe " + pipename;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.Verb = "runas";
try
@@ -157,7 +158,7 @@ namespace OpenRA.Utility
using (var reader = new StreamReader(pipe))
{
while (!p.HasExited)
Console.Write(reader.ReadLine());
Console.WriteLine(reader.ReadLine());
}
}
@@ -173,9 +174,7 @@ namespace OpenRA.Utility
using (var reader = p.StandardOutput)
{
while(!p.HasExited)
{
Console.WriteLine(reader.ReadLine());
}
}
}
}