msi: Only unpublish the features if the entire product is being uninstalled.
This commit is contained in:
parent
9f11a5a878
commit
ccdf578ba2
|
@ -3754,11 +3754,24 @@ static UINT msi_unpublish_feature(MSIPACKAGE *package, MSIFEATURE *feature)
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static BOOL msi_check_unpublish(MSIPACKAGE *package)
|
||||
{
|
||||
MSIFEATURE *feature;
|
||||
|
||||
LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry)
|
||||
{
|
||||
if (feature->ActionRequest != INSTALLSTATE_ABSENT)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static UINT ACTION_UnpublishFeatures(MSIPACKAGE *package)
|
||||
{
|
||||
MSIFEATURE *feature;
|
||||
|
||||
if (msi_check_publish(package))
|
||||
if (!msi_check_unpublish(package))
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry)
|
||||
|
|
|
@ -2169,16 +2169,10 @@ static void test_publish(void)
|
|||
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
|
||||
|
||||
state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
|
||||
todo_wine
|
||||
{
|
||||
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
|
||||
}
|
||||
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
|
||||
|
||||
state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
|
||||
todo_wine
|
||||
{
|
||||
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
|
||||
}
|
||||
ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
|
||||
|
||||
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
|
||||
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
|
||||
|
|
Loading…
Reference in New Issue