From fe6d7d16c8c272f65cab3e3dbf6307cefbd316a6 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Wed, 21 Aug 2019 08:30:18 +1000 Subject: [PATCH] Handling chrome browser not installed --- Wox.Plugin/SharedCommands/SearchWeb.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Wox.Plugin/SharedCommands/SearchWeb.cs b/Wox.Plugin/SharedCommands/SearchWeb.cs index 0dc03ee6d5..853fca43dc 100644 --- a/Wox.Plugin/SharedCommands/SearchWeb.cs +++ b/Wox.Plugin/SharedCommands/SearchWeb.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.IO; using System.Linq; @@ -21,7 +21,14 @@ namespace Wox.Plugin.SharedCommands // Internet Explorer will open url in new browser window, and does not take the --new-window parameter var browserArguements = browserExecutableName == "iexplore.exe" ? url : "--new-window " + url; - Process.Start(browser, browserArguements); + try + { + Process.Start(browser, browserArguements); + } + catch (System.ComponentModel.Win32Exception) + { + Process.Start(url); + } } } }