Open a new window of Google Chrome from C#
You can do it by passing --new-window
argument to the process
x86
Process process = new Process();process.StartInfo.FileName = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe";process.StartInfo.Arguments = "google.com" + " --new-window";process.Start();
x64
Process process = new Process();process.StartInfo.FileName = @"C:\Program Files\Google\Chrome\Application\chrome.exe";process.StartInfo.Arguments = "google.com" + " --new-window";process.Start();
Shorter version, looking first for chrome then for firefox (the syntax is different)
strURL="http://myurl.com";try{ //Launch Chrome in a new window System.Diagnostics.Process.Start("chrome", strURL+" --new-window"); }catch{ try { //Chrome not found ... launch Firefox in a new window System.Diagnostics.Process.Start("firefox", "-new-window "+ strURL); } catch { //WARN THE USER TO INSTALL A BROWSER... }}