开发者

Process.Start will not launch chrome

开发者 https://www.devze.com 2023-04-08 17:12 出处:网络
I\'m having trouble getting Process.Start to launch chrome. If chrome is set as the default browser - nothing is opened. I also have tried providing two argument ex:

I'm having trouble getting Process.Start to launch chrome. If chrome is set as the default browser - nothing is opened. I also have tried providing two argument ex:

    Process.Start("chrome",url)
    Process.Start("PathToChrome",url)
    Process.Start("chrome.exe",url)

None of those work either. It works fine when IE or Firefox are the default browser. This same problem has been reproduced on two开发者_如何学JAVA computers.


A shot in the dark, but: Since you tagged this question "windows installer", it occurs to me you may have been calling Process.Start() in a custom installer. If so, is the setup project property InstallAllUsers set to true? If so, set it to false and Process.Start(someUrl) should work correctly, even if Chrome is the default browser.

0

精彩评论

暂无评论...
验证码 换一张
取 消