| Index: chrome/browser/chrome_browser_main_win.cc
|
| diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
|
| index 67850bafb37462585818d4656910ea88774481f4..463c94134ee8c0536233921abd86c681e694d4f5 100644
|
| --- a/chrome/browser/chrome_browser_main_win.cc
|
| +++ b/chrome/browser/chrome_browser_main_win.cc
|
| @@ -358,13 +358,26 @@ bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() {
|
| CommandLine uninstall_cmd(
|
| InstallUtil::GetChromeUninstallCmd(false, dist->GetType()));
|
| if (!uninstall_cmd.GetProgram().empty()) {
|
| + uninstall_cmd.AppendSwitch(installer::switches::kSelfDestruct);
|
| uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall);
|
| uninstall_cmd.AppendSwitch(
|
| installer::switches::kDoNotRemoveSharedItems);
|
| - base::LaunchOptions launch_options;
|
| +
|
| + const FilePath setup_exe(uninstall_cmd.GetProgram());
|
| + const string16 params(uninstall_cmd.GetArgumentsString());
|
| +
|
| + SHELLEXECUTEINFO sei = { sizeof(sei) };
|
| + sei.fMask = SEE_MASK_NOASYNC;
|
| + sei.nShow = SW_SHOWNORMAL;
|
| + sei.lpFile = setup_exe.value().c_str();
|
| + sei.lpParameters = params.c_str();
|
| + // On Windows 8 SEE_MASK_FLAG_LOG_USAGE is necessary to guarantee we
|
| + // flip to the Desktop when launching.
|
| if (is_metro)
|
| - launch_options.force_breakaway_from_job_ = true;
|
| - base::LaunchProcess(uninstall_cmd, launch_options, NULL);
|
| + sei.fMask |= SEE_MASK_FLAG_LOG_USAGE;
|
| +
|
| + if (!::ShellExecuteEx(&sei))
|
| + DPCHECK(false);
|
| }
|
| return true;
|
| }
|
|
|