msi: Don't publish features with non positive install level.
This commit is contained in:
parent
1cfee7da6e
commit
331c86f124
|
@ -4892,6 +4892,8 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
|
||||||
BOOL absent = FALSE;
|
BOOL absent = FALSE;
|
||||||
MSIRECORD *uirow;
|
MSIRECORD *uirow;
|
||||||
|
|
||||||
|
if (feature->Level <= 0) continue;
|
||||||
|
|
||||||
if (feature->Action != INSTALLSTATE_LOCAL &&
|
if (feature->Action != INSTALLSTATE_LOCAL &&
|
||||||
feature->Action != INSTALLSTATE_SOURCE &&
|
feature->Action != INSTALLSTATE_SOURCE &&
|
||||||
feature->Action != INSTALLSTATE_ADVERTISED) absent = TRUE;
|
feature->Action != INSTALLSTATE_ADVERTISED) absent = TRUE;
|
||||||
|
|
|
@ -2689,6 +2689,7 @@ static void test_states(void)
|
||||||
{'w','i','n','e','t','e','s','t','3','-','p','a','c','k','a','g','e','.','m','s','i',0};
|
{'w','i','n','e','t','e','s','t','3','-','p','a','c','k','a','g','e','.','m','s','i',0};
|
||||||
static const WCHAR msifile4W[] =
|
static const WCHAR msifile4W[] =
|
||||||
{'w','i','n','e','t','e','s','t','4','-','p','a','c','k','a','g','e','.','m','s','i',0};
|
{'w','i','n','e','t','e','s','t','4','-','p','a','c','k','a','g','e','.','m','s','i',0};
|
||||||
|
INSTALLSTATE state;
|
||||||
MSIHANDLE hpkg;
|
MSIHANDLE hpkg;
|
||||||
UINT r;
|
UINT r;
|
||||||
MSIHANDLE hdb;
|
MSIHANDLE hdb;
|
||||||
|
@ -3217,10 +3218,16 @@ static void test_states(void)
|
||||||
r = MsiInstallProductA(msifile, "REMOVE=ALL");
|
r = MsiInstallProductA(msifile, "REMOVE=ALL");
|
||||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
|
||||||
|
state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "five");
|
||||||
|
ok(state == INSTALLSTATE_UNKNOWN, "state = %d\n", state);
|
||||||
|
|
||||||
/* all features installed locally */
|
/* all features installed locally */
|
||||||
r = MsiInstallProductA(msifile2, "ADDLOCAL=ALL");
|
r = MsiInstallProductA(msifile2, "ADDLOCAL=ALL");
|
||||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
|
|
||||||
|
state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "five");
|
||||||
|
ok(state == INSTALLSTATE_UNKNOWN, "state = %d\n", state);
|
||||||
|
|
||||||
r = MsiOpenDatabaseW(msifile2W, MSIDBOPEN_DIRECT, &hdb);
|
r = MsiOpenDatabaseW(msifile2W, MSIDBOPEN_DIRECT, &hdb);
|
||||||
ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r);
|
ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue