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

Unified Diff: chrome/installer/setup/install_worker.cc

Issue 11733007: Duplicate setup.exe into an identical executable and point Active Setup to that executable instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add to InstallerState Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/util/installer_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install_worker.cc
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index 245abc4f53cf4e3b9ec25cfd5a03f91e822e88cc..7d774e2352dd0750509d1a3928d4192eb7e0b49c 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -168,6 +168,15 @@ void AddInstallerCopyTasks(const InstallerState& installer_state,
temp_path.value(), WorkItem::ALWAYS);
}
+ if (installer_state.RequiresActiveSetup()) {
+ // Make a copy of setup.exe with a different name so that Active Setup
+ // doesn't require an admin on XP thanks to Application Compatibility.
+ FilePath active_setup_exe(installer_dir.Append(kActiveSetupExe));
+ install_list->AddCopyTreeWorkItem(
+ setup_path.value(), active_setup_exe.value(), temp_path.value(),
+ WorkItem::ALWAYS);
+ }
+
// If only the App Host (not even the Chrome Binaries) is being installed,
// this must be a user-level App Host piggybacking on system-level Chrome
// Binaries. Only setup.exe is required, and only for uninstall.
@@ -1400,6 +1409,7 @@ void AddActiveSetupWorkItems(const InstallerState& installer_state,
<< "-level " << distribution->GetAppShortCutName();
return;
}
+ DCHECK(installer_state.RequiresActiveSetup());
const HKEY root = HKEY_LOCAL_MACHINE;
const string16 active_setup_path(
@@ -1410,8 +1420,9 @@ void AddActiveSetupWorkItems(const InstallerState& installer_state,
list->AddSetRegValueWorkItem(root, active_setup_path, L"",
distribution->GetAppShortCutName(), true);
- CommandLine cmd(installer_state.GetInstallerDirectory(new_version).
- Append(setup_path.BaseName()));
+ FilePath active_setup_exe(installer_state.GetInstallerDirectory(new_version)
+ .Append(kActiveSetupExe));
+ CommandLine cmd(active_setup_exe);
cmd.AppendSwitch(installer::switches::kConfigureUserSettings);
cmd.AppendSwitch(installer::switches::kVerboseLogging);
cmd.AppendSwitch(installer::switches::kSystemLevel);
« no previous file with comments | « no previous file | chrome/installer/util/installer_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698