or
private
static
void
LaunchNewBrowserInternal(
string
startUrl)
{
string
str = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Google\\Chrome\\Application\\chrome.exe"
);
if
(!System.IO.File.Exists(str))
{
str = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
"Google\\Chrome\\Application\\chrome.exe"
);
if
(!System.IO.File.Exists(str))
throw
new
FileNotFoundException(
"Chrome browser is not installed on this machine"
, str);
}
string
arguments =
string
.Format(
"-new-window -home-page {0}"
, (
object
) startUrl);
Process.Start(
new
ProcessStartInfo(str, arguments)
{
Verb =
"open"
,
WindowStyle = ProcessWindowStyle.Normal
});
}