mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
Assembly Naming, Default Windows Service Account
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
@@ -27,7 +27,7 @@ namespace NzbDrone.Common.Processes
|
||||
bool Exists(string processName);
|
||||
ProcessPriorityClass GetCurrentProcessPriority();
|
||||
Process Start(string path, string args = null, StringDictionary environmentVariables = null, Action<string> onOutputDataReceived = null, Action<string> onErrorDataReceived = null);
|
||||
Process SpawnNewProcess(string path, string args = null, StringDictionary environmentVariables = null);
|
||||
Process SpawnNewProcess(string path, string args = null, StringDictionary environmentVariables = null, bool noWindow = false);
|
||||
ProcessOutput StartAndCapture(string path, string args = null, StringDictionary environmentVariables = null);
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace NzbDrone.Common.Processes
|
||||
return process;
|
||||
}
|
||||
|
||||
public Process SpawnNewProcess(string path, string args = null, StringDictionary environmentVariables = null)
|
||||
public Process SpawnNewProcess(string path, string args = null, StringDictionary environmentVariables = null, bool noWindow = false)
|
||||
{
|
||||
if (PlatformInfo.IsMono && path.EndsWith(".exe", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
@@ -183,6 +183,9 @@ namespace NzbDrone.Common.Processes
|
||||
_logger.Debug("Starting {0} {1}", path, args);
|
||||
|
||||
var startInfo = new ProcessStartInfo(path, args);
|
||||
startInfo.CreateNoWindow = noWindow;
|
||||
startInfo.UseShellExecute = !noWindow;
|
||||
|
||||
var process = new Process
|
||||
{
|
||||
StartInfo = startInfo
|
||||
|
||||
Reference in New Issue
Block a user