fix utility elevation
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Pipes;
|
using System.IO.Pipes;
|
||||||
using System.Security.AccessControl;
|
using System.Security.AccessControl;
|
||||||
|
|||||||
@@ -137,7 +137,8 @@ namespace OpenRA.Utility
|
|||||||
string pipename = Util.GetPipeName();
|
string pipename = Util.GetPipeName();
|
||||||
var p = new Process();
|
var p = new Process();
|
||||||
p.StartInfo.FileName = "OpenRA.Utility.exe";
|
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";
|
p.StartInfo.Verb = "runas";
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -157,7 +158,7 @@ namespace OpenRA.Utility
|
|||||||
using (var reader = new StreamReader(pipe))
|
using (var reader = new StreamReader(pipe))
|
||||||
{
|
{
|
||||||
while (!p.HasExited)
|
while (!p.HasExited)
|
||||||
Console.Write(reader.ReadLine());
|
Console.WriteLine(reader.ReadLine());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,9 +174,7 @@ namespace OpenRA.Utility
|
|||||||
using (var reader = p.StandardOutput)
|
using (var reader = p.StandardOutput)
|
||||||
{
|
{
|
||||||
while(!p.HasExited)
|
while(!p.HasExited)
|
||||||
{
|
|
||||||
Console.WriteLine(reader.ReadLine());
|
Console.WriteLine(reader.ReadLine());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user