SEBWIN-359: Fixed freeze during startup or application start by explicitly disabling shell execution when starting a process, as this appears to be the root cause of the freeze on Windows 10 version 1903 and above.
This commit is contained in:
parent
7e3703dc16
commit
ad023853d4
1 changed files with 11 additions and 1 deletions
|
@ -63,7 +63,7 @@ namespace SafeExamBrowser.WindowsApi
|
|||
}
|
||||
else
|
||||
{
|
||||
raw = System.Diagnostics.Process.Start(path, string.Join(" ", args));
|
||||
raw = StartNormal(path, args);
|
||||
}
|
||||
|
||||
var (name, originalName) = LoadProcessNamesFor(raw);
|
||||
|
@ -166,6 +166,16 @@ namespace SafeExamBrowser.WindowsApi
|
|||
return logger.CloneFor($"{nameof(Process)} '{name}' ({process.Id})");
|
||||
}
|
||||
|
||||
private System.Diagnostics.Process StartNormal(string path, params string[] args)
|
||||
{
|
||||
return System.Diagnostics.Process.Start(new ProcessStartInfo
|
||||
{
|
||||
Arguments = string.Join(" ", args),
|
||||
FileName = path,
|
||||
UseShellExecute = false
|
||||
});
|
||||
}
|
||||
|
||||
private System.Diagnostics.Process StartOnDesktop(string path, params string[] args)
|
||||
{
|
||||
var commandLine = $"{'"' + path + '"'} {string.Join(" ", args)}";
|
||||
|
|
Loading…
Reference in a new issue