I want to 开发者_StackOverflowlaunch Google Chrome from Process.Start method. It works on Windows XP Process.Start("chrome"). But it is not working on Windows 7. One thing I noticed that I cannot run chrome from Start>Run. May be it is not registered. I tried to uninstall and install again, but did not work. I also added full path of Chrome.exe in Path variable of Environment Variables, but still did not work. How can I make it to runnable from Start>Run
On my Win7 machine. Chrome is installed in %USERPROFILE%\AppData\Local\Google\Chrome\Application\
And the following works:
string userProfilePath = Environment.ExpandEnvironmentVariables("%userprofile%");
Process.Start(Path.Combine(userProfilePath, @"AppData\Local\Google\Chrome\Application\chrome.exe"));
I've noticed that Chrome sometimes fires up without a window in Windows 7. You can right-click the taskbar icon and open a new Chrome window from there. I assume that Process.Start()
is invoking the same behaviour.
Of course, this doesn't solve your problem, but hopefully it leads you to an answer (I don't know how to fix this yet; perhaps Google will fix it in an upgrade).
精彩评论