Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/installer/setup/main.cc

Issue 28128: Fix all places where we used the GetWinVersion function... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/about_chrome_view.cc ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 #include <windows.h> 6 #include <windows.h>
7 #include <msi.h> 7 #include <msi.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 installer_util::switches::kRegisterChromeBrowser)); 517 installer_util::switches::kRegisterChromeBrowser));
518 return ShellUtil::AddChromeToSetAccessDefaults(chrome_exe, true); 518 return ShellUtil::AddChromeToSetAccessDefaults(chrome_exe, true);
519 // If --rename-chrome-exe is specified, we want to rename the executables 519 // If --rename-chrome-exe is specified, we want to rename the executables
520 // and exit. 520 // and exit.
521 } else if (parsed_command_line.HasSwitch( 521 } else if (parsed_command_line.HasSwitch(
522 installer_util::switches::kRenameChromeExe)) { 522 installer_util::switches::kRenameChromeExe)) {
523 return RenameChromeExecutables(system_install); 523 return RenameChromeExecutables(system_install);
524 } 524 }
525 525
526 if (system_install && !IsUserAnAdmin()) { 526 if (system_install && !IsUserAnAdmin()) {
527 if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA && 527 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA &&
528 !parsed_command_line.HasSwitch(installer_util::switches::kRunAsAdmin)) { 528 !parsed_command_line.HasSwitch(installer_util::switches::kRunAsAdmin)) {
529 std::wstring exe = parsed_command_line.program(); 529 std::wstring exe = parsed_command_line.program();
530 std::wstring params(command_line); 530 std::wstring params(command_line);
531 // Append --run-as-admin flag to let the new instance of setup.exe know 531 // Append --run-as-admin flag to let the new instance of setup.exe know
532 // that we already tried to launch ourselves as admin. 532 // that we already tried to launch ourselves as admin.
533 params.append(L" --"); 533 params.append(L" --");
534 params.append(installer_util::switches::kRunAsAdmin); 534 params.append(installer_util::switches::kRunAsAdmin);
535 DWORD exit_code = installer_util::UNKNOWN_STATUS; 535 DWORD exit_code = installer_util::UNKNOWN_STATUS;
536 InstallUtil::ExecuteExeAsAdmin(exe, params, &exit_code); 536 InstallUtil::ExecuteExeAsAdmin(exe, params, &exit_code);
537 return exit_code; 537 return exit_code;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 577
578 install_status = InstallChrome(parsed_command_line, 578 install_status = InstallChrome(parsed_command_line,
579 installed_version.get(), 579 installed_version.get(),
580 options); 580 options);
581 } 581 }
582 582
583 CoUninitialize(); 583 CoUninitialize();
584 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 584 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
585 return dist->GetInstallReturnCode(install_status); 585 return dist->GetInstallReturnCode(install_status);
586 } 586 }
OLDNEW
« no previous file with comments | « chrome/browser/views/about_chrome_view.cc ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698