How to launch a Google Chrome Tab with specific URL using C#

后端 未结 4 487
渐次进展
渐次进展 2020-12-08 13:33

Is there a way I can launch a tab (not a new Window) in Google Chrome with a specific URL loaded into it from a custom app? My application is coded in

4条回答
  •  萌比男神i
    2020-12-08 13:40

    UPDATE: Please see Dylan's or d.c's anwer for a little easier (and more stable) solution, which does not rely on Chrome beeing installed in LocalAppData!


    Even if I agree with Daniel Hilgarth to open a new tab in chrome you just need to execute chrome.exe with your URL as the argument:

    Process.Start(@"%AppData%\..\Local\Google\Chrome\Application\chrome.exe", 
                  "http:\\www.YourUrl.com");
    

提交回复
热议问题