From 23c052473898b404233781ec34554d73b331fc13 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 7 Feb 2011 18:50:13 +1300 Subject: [PATCH] fix utility elevation --- OpenRA.Utility/Program.cs | 1 + OpenRA.Utility/Util.cs | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Utility/Program.cs b/OpenRA.Utility/Program.cs index cdb66914e5..38b4d44c0e 100644 --- a/OpenRA.Utility/Program.cs +++ b/OpenRA.Utility/Program.cs @@ -10,6 +10,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.IO; using System.IO.Pipes; using System.Security.AccessControl; diff --git a/OpenRA.Utility/Util.cs b/OpenRA.Utility/Util.cs index 700a42f140..9534379be0 100644 --- a/OpenRA.Utility/Util.cs +++ b/OpenRA.Utility/Util.cs @@ -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()); - } } } }