diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-11 21:45:57 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-11 21:45:57 +0000 |
commit | c6e89201faff8f99401daaa604b78d3a5e5070ea (patch) | |
tree | c04478e892008f06efb539935823088b3be15fdc /chrome/installer | |
parent | d1192bcc5436ea4c57b3317a1951060bdd9d4215 (diff) | |
download | chromium_src-c6e89201faff8f99401daaa604b78d3a5e5070ea.zip chromium_src-c6e89201faff8f99401daaa604b78d3a5e5070ea.tar.gz chromium_src-c6e89201faff8f99401daaa604b78d3a5e5070ea.tar.bz2 |
If running under an MSI, setup.exe must always return 0 on uninstallation.
BUG=19370
TEST=None
Review URL: http://codereview.chromium.org/755002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/setup/setup_main.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index 4c9e6c9..96339e0 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -708,8 +708,17 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, } } - // Note that we allow the status installer_util::UNINSTALL_REQUIRES_REBOOT - // to pass through, since this is only returned on uninstall which is never - // invoked directly by Google Update. - return dist->GetInstallReturnCode(install_status); + int return_code = 0; + // MSI demands that custom actions always return 0 (ERROR_SUCCESS) or it will + // rollback the action. If we're uninstalling we want to avoid this, so always + // report success, squashing any more informative return codes. + if (!(parsed_command_line.HasSwitch(installer_util::switches::kMsi) && + parsed_command_line.HasSwitch(installer_util::switches::kUninstall))) { + // Note that we allow the status installer_util::UNINSTALL_REQUIRES_REBOOT + // to pass through, since this is only returned on uninstall which is never + // invoked directly by Google Update. + dist->GetInstallReturnCode(install_status); + } + + return return_code; } |