mirror of https://github.com/winsw/winsw
parent
2edcee7f49
commit
e380e6c64e
|
@ -601,19 +601,15 @@ namespace WinSW
|
||||||
string? stderrName = Console.IsErrorRedirected ? Guid.NewGuid().ToString() : null;
|
string? stderrName = Console.IsErrorRedirected ? Guid.NewGuid().ToString() : null;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
string arguments = "/elevated " +
|
string exe = Environment.GetCommandLineArgs()[0];
|
||||||
|
string commandLine = Environment.CommandLine;
|
||||||
|
string arguments = "/elevated" +
|
||||||
#if VNEXT
|
#if VNEXT
|
||||||
" " + (stdinName ?? NoPipe) +
|
" " + (stdinName ?? NoPipe) +
|
||||||
" " + (stdoutName ?? NoPipe) +
|
" " + (stdoutName ?? NoPipe) +
|
||||||
" " + (stderrName ?? NoPipe) +
|
" " + (stderrName ?? NoPipe) +
|
||||||
#endif
|
#endif
|
||||||
#if NET
|
commandLine.Remove(commandLine.IndexOf(exe), exe.Length).TrimStart('"');
|
||||||
string.Join(' ', args);
|
|
||||||
#elif !NET20
|
|
||||||
string.Join(" ", args);
|
|
||||||
#else
|
|
||||||
string.Join(" ", args.ToArray());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
var startInfo = new ProcessStartInfo
|
var startInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue