mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-30 01:34:08 +00:00
fix: hide CMD window when launching upgrade process (AmazTool)
Add WindowStyle = ProcessWindowStyle.Hidden to ProcUtils.ProcessStart and ProcUtils.RebootAsAdmin to prevent the black console window from popping up during automatic updates and restarts. Fixes #8240
This commit is contained in:
parent
8450f2e420
commit
c218b5fc79
1 changed files with 3 additions and 1 deletions
|
|
@ -33,7 +33,8 @@ public static class ProcUtils
|
|||
UseShellExecute = true,
|
||||
FileName = fileName,
|
||||
Arguments = arguments,
|
||||
WorkingDirectory = dir ?? string.Empty
|
||||
WorkingDirectory = dir ?? string.Empty,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
}
|
||||
};
|
||||
_ = proc.Start();
|
||||
|
|
@ -57,6 +58,7 @@ public static class ProcUtils
|
|||
WorkingDirectory = Utils.StartupPath(),
|
||||
FileName = Utils.GetExePath().AppendQuotes(),
|
||||
Verb = blAdmin ? "runas" : null,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
};
|
||||
return Process.Start(startInfo) != null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue