mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[PT Run] Web search should use user's default browser (#17304)
* Web search does not use my default browser #16549 updated DefaultBrowserInfo logic to get program location from shell open command not icon location * Refactored DefaultBrowserInfo to start default browser with arguments specified in shell/open/command value for the browser. Added fallback to Microsoft Edge if no browser information available. #16549 Web search does not use my default browser * fixed comment #16549 Web search does not use my default browser
This commit is contained in:
@@ -148,6 +148,16 @@ namespace Wox.Infrastructure
|
||||
return Process.Start(processStartInfo);
|
||||
}
|
||||
|
||||
public static bool OpenCommandInShell(string path, string pattern, string arguments, string workingDir = null, ShellRunAsType runAs = ShellRunAsType.None, bool runWithHiddenWindow = false)
|
||||
{
|
||||
if (pattern.Contains("%1", StringComparison.Ordinal))
|
||||
{
|
||||
arguments = pattern.Replace("%1", arguments);
|
||||
}
|
||||
|
||||
return OpenInShell(path, arguments, workingDir, runAs, runWithHiddenWindow);
|
||||
}
|
||||
|
||||
public static bool OpenInShell(string path, string arguments = null, string workingDir = null, ShellRunAsType runAs = ShellRunAsType.None, bool runWithHiddenWindow = false)
|
||||
{
|
||||
using (var process = new Process())
|
||||
|
||||
Reference in New Issue
Block a user