msi: Properly register features.
This commit is contained in:
parent
fc6b9dd4e4
commit
9f11a5a878
|
@ -3625,6 +3625,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
|
||||||
UINT rc;
|
UINT rc;
|
||||||
HKEY hkey=0;
|
HKEY hkey=0;
|
||||||
HKEY hukey=0;
|
HKEY hukey=0;
|
||||||
|
HKEY userdata=0;
|
||||||
|
|
||||||
if (!msi_check_publish(package))
|
if (!msi_check_publish(package))
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
@ -3637,6 +3638,10 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
|
rc = MSIREG_OpenUserDataFeaturesKey(package->ProductCode, &userdata, TRUE);
|
||||||
|
if (rc != ERROR_SUCCESS)
|
||||||
|
goto end;
|
||||||
|
|
||||||
/* here the guids are base 85 encoded */
|
/* here the guids are base 85 encoded */
|
||||||
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
|
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
|
||||||
{
|
{
|
||||||
|
@ -3678,6 +3683,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
|
||||||
strcatW(data,buf);
|
strcatW(data,buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (feature->Feature_Parent)
|
if (feature->Feature_Parent)
|
||||||
{
|
{
|
||||||
static const WCHAR sep[] = {'\2',0};
|
static const WCHAR sep[] = {'\2',0};
|
||||||
|
@ -3686,6 +3692,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
|
||||||
}
|
}
|
||||||
|
|
||||||
msi_reg_set_val_str( hkey, feature->Feature, data );
|
msi_reg_set_val_str( hkey, feature->Feature, data );
|
||||||
|
msi_reg_set_val_str( userdata, feature->Feature, data );
|
||||||
msi_free(data);
|
msi_free(data);
|
||||||
|
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
|
@ -2063,16 +2063,10 @@ static void test_publish(void)
|
||||||
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
|
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
|
||||||
|
|
||||||
state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
|
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");
|
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,
|
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
|
||||||
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
|
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
|
||||||
|
@ -2112,16 +2106,10 @@ static void test_publish(void)
|
||||||
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
|
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
|
||||||
|
|
||||||
state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
|
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");
|
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,
|
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
|
||||||
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
|
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
|
||||||
|
@ -2161,16 +2149,10 @@ static void test_publish(void)
|
||||||
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
|
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
|
||||||
|
|
||||||
state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
|
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");
|
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,
|
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
|
||||||
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
|
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
|
||||||
|
@ -2262,16 +2244,10 @@ static void test_publish(void)
|
||||||
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
|
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
|
||||||
|
|
||||||
state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
|
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");
|
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,
|
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
|
||||||
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
|
"{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
|
||||||
|
|
Loading…
Reference in New Issue