Skip to content
Snippets Groups Projects
Commit 40cfbaf0 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard
Browse files

msi: Fix handling of REINSTALL overrides.

We were forcing features with a REINSTALL override to be reinstalled
locally, which is only correct if the original install state is local.

This causes problems with the office 2007 sp1 installer, which applies
a REINSTALL override to an advertised feature.
parent a2de9de2
No related branches found
No related tags found
No related merge requests found
......@@ -1782,6 +1782,7 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
{
static const WCHAR all[]={'A','L','L',0};
static const WCHAR remove[] = {'R','E','M','O','V','E',0};
static const WCHAR reinstall[] = {'R','E','I','N','S','T','A','L','L',0};
LPWSTR override;
MSIFEATURE *feature;
......@@ -1795,6 +1796,8 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
(feature->Level <= 0 || feature->Level > level))
continue;
if (!strcmpW(property, reinstall)) state = feature->Installed;
if (strcmpiW(override,all)==0)
msi_feature_set_state(package, feature, state);
else
......@@ -1871,7 +1874,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
override |= process_state_property(package, level, szAddLocal, INSTALLSTATE_LOCAL);
override |= process_state_property(package, level, szRemove, INSTALLSTATE_ABSENT);
override |= process_state_property(package, level, szAddSource, INSTALLSTATE_SOURCE);
override |= process_state_property(package, level, szReinstall, INSTALLSTATE_LOCAL);
override |= process_state_property(package, level, szReinstall, INSTALLSTATE_UNKNOWN);
if (!override)
{
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment