msi: Properly register features.

This commit is contained in:
James Hawkins 2007-11-01 03:13:28 -05:00 committed by Alexandre Julliard
parent fc6b9dd4e4
commit 9f11a5a878
2 changed files with 15 additions and 32 deletions

View File

@ -3625,6 +3625,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
UINT rc;
HKEY hkey=0;
HKEY hukey=0;
HKEY userdata=0;
if (!msi_check_publish(package))
return ERROR_SUCCESS;
@ -3637,6 +3638,10 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
if (rc != ERROR_SUCCESS)
goto end;
rc = MSIREG_OpenUserDataFeaturesKey(package->ProductCode, &userdata, TRUE);
if (rc != ERROR_SUCCESS)
goto end;
/* here the guids are base 85 encoded */
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
{
@ -3678,6 +3683,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
strcatW(data,buf);
}
}
if (feature->Feature_Parent)
{
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( userdata, feature->Feature, data );
msi_free(data);
size = 0;

View File

@ -2063,16 +2063,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);
@ -2112,16 +2106,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);
@ -2161,16 +2149,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);
@ -2262,16 +2244,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);