mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +00:00
Fix ProcUtils NoAssociatedProcess issue
This commit is contained in:
parent
bccab41c8f
commit
e986dc189e
1 changed files with 4 additions and 4 deletions
|
@ -24,18 +24,18 @@ public static class ProcUtils
|
||||||
if (arguments.Contains(' '))
|
if (arguments.Contains(' '))
|
||||||
arguments = arguments.AppendQuotes();
|
arguments = arguments.AppendQuotes();
|
||||||
|
|
||||||
Process process = new()
|
Process proc = new()
|
||||||
{
|
{
|
||||||
StartInfo = new ProcessStartInfo
|
StartInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
UseShellExecute = true,
|
UseShellExecute = true,
|
||||||
FileName = fileName,
|
FileName = fileName,
|
||||||
Arguments = arguments,
|
Arguments = arguments,
|
||||||
WorkingDirectory = dir
|
WorkingDirectory = dir ?? string.Empty
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
process.Start();
|
proc.Start();
|
||||||
return process.Id;
|
return dir is null ? null : proc.Id;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue