Handling chrome browser not installed

This commit is contained in:
Jeremy Wu
2019-08-21 08:30:18 +10:00
parent 1761f63acd
commit fe6d7d16c8

View File

@@ -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);
}
}
}
}