msi: Perform a full uninstall if no feature resolves to INSTALLSTATE_LOCAL.
This commit is contained in:
parent
686eb17332
commit
8ff57beb0e
|
@ -4915,32 +4915,23 @@ static UINT ACTION_InstallExecute(MSIPACKAGE *package)
|
||||||
return execute_script(package,INSTALL_SCRIPT);
|
return execute_script(package,INSTALL_SCRIPT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT msi_unpublish_product(MSIPACKAGE *package, WCHAR *remove)
|
static UINT msi_unpublish_product( MSIPACKAGE *package, const WCHAR *remove )
|
||||||
{
|
{
|
||||||
|
static const WCHAR szUpgradeCode[] = {'U','p','g','r','a','d','e','C','o','d','e',0};
|
||||||
WCHAR *upgrade, **features;
|
WCHAR *upgrade, **features;
|
||||||
BOOL full_uninstall = TRUE;
|
BOOL full_uninstall = TRUE;
|
||||||
MSIFEATURE *feature;
|
MSIFEATURE *feature;
|
||||||
MSIPATCHINFO *patch;
|
MSIPATCHINFO *patch;
|
||||||
|
UINT i;
|
||||||
|
|
||||||
static const WCHAR szUpgradeCode[] =
|
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
|
||||||
{'U','p','g','r','a','d','e','C','o','d','e',0};
|
|
||||||
|
|
||||||
features = msi_split_string(remove, ',');
|
|
||||||
if (!features)
|
|
||||||
{
|
{
|
||||||
ERR("REMOVE feature list is empty!\n");
|
if (feature->Action == INSTALLSTATE_LOCAL) full_uninstall = FALSE;
|
||||||
return ERROR_FUNCTION_FAILED;
|
|
||||||
}
|
}
|
||||||
|
features = msi_split_string( remove, ',' );
|
||||||
if (!strcmpW( features[0], szAll ))
|
for (i = 0; features && features[i]; i++)
|
||||||
full_uninstall = TRUE;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry)
|
if (!strcmpW( features[i], szAll )) full_uninstall = TRUE;
|
||||||
{
|
|
||||||
if (feature->Action != INSTALLSTATE_ABSENT)
|
|
||||||
full_uninstall = FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
msi_free(features);
|
msi_free(features);
|
||||||
|
|
||||||
|
@ -4991,9 +4982,7 @@ static UINT ACTION_InstallFinalize(MSIPACKAGE *package)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
remove = msi_dup_property(package->db, szRemove);
|
remove = msi_dup_property(package->db, szRemove);
|
||||||
if (remove)
|
|
||||||
rc = msi_unpublish_product(package, remove);
|
rc = msi_unpublish_product(package, remove);
|
||||||
|
|
||||||
msi_free(remove);
|
msi_free(remove);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue