mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Check Process.Start usage
This commit is contained in:
parent
8c8180815b
commit
e1242eefda
4 changed files with 4 additions and 9 deletions
|
|
@ -674,6 +674,7 @@ namespace Flow.Launcher.Infrastructure
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// No need to de-elevate since we are opening windows settings which cannot bring security risks
|
||||||
Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
|
Process.Start(new ProcessStartInfo("ms-settings:regionlanguage") { UseShellExecute = true });
|
||||||
}
|
}
|
||||||
catch (System.Exception)
|
catch (System.Exception)
|
||||||
|
|
|
||||||
|
|
@ -367,7 +367,7 @@ namespace Flow.Launcher
|
||||||
UseShellExecute = true,
|
UseShellExecute = true,
|
||||||
Verb = Win32Helper.IsAdministrator() || forceAdmin ? "runas" : ""
|
Verb = Win32Helper.IsAdministrator() || forceAdmin ? "runas" : ""
|
||||||
};
|
};
|
||||||
Process.Start(startInfo);
|
Process.Start(startInfo); // No need to de-elevate since we are restarting
|
||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -404,7 +404,6 @@ namespace Flow.Launcher
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void OpenUri(Uri uri, bool? inPrivate = null)
|
private void OpenUri(Uri uri, bool? inPrivate = null)
|
||||||
{
|
{
|
||||||
if (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps)
|
if (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps)
|
||||||
|
|
@ -438,13 +437,7 @@ namespace Flow.Launcher
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Process.Start(new ProcessStartInfo()
|
StartProcess(uri.AbsoluteUri, arguments: null, useShellExecute: true);
|
||||||
{
|
|
||||||
FileName = uri.AbsoluteUri,
|
|
||||||
UseShellExecute = true
|
|
||||||
})?.Dispose();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,7 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// No need to de-elevate since we are opening windows settings which cannot bring security risks
|
||||||
Process.Start(processStartInfo);
|
Process.Start(processStartInfo);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue