msi: Don't publish features to an invalid location.
This commit is contained in:
parent
d8e4258d08
commit
af56e28f7e
|
@ -3733,17 +3733,12 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
MSIFEATURE *feature;
|
MSIFEATURE *feature;
|
||||||
UINT rc;
|
UINT rc;
|
||||||
HKEY hkey=0;
|
|
||||||
HKEY hukey=0;
|
HKEY hukey=0;
|
||||||
HKEY userdata=0;
|
HKEY userdata=0;
|
||||||
|
|
||||||
if (!msi_check_publish(package))
|
if (!msi_check_publish(package))
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
||||||
rc = MSIREG_OpenFeaturesKey(package->ProductCode,&hkey,TRUE);
|
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
rc = MSIREG_OpenUserFeaturesKey(package->ProductCode,&hukey,TRUE);
|
rc = MSIREG_OpenUserFeaturesKey(package->ProductCode,&hukey,TRUE);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -3801,7 +3796,6 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
|
||||||
strcatW(data,feature->Feature_Parent);
|
strcatW(data,feature->Feature_Parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
msi_reg_set_val_str( hkey, feature->Feature, data );
|
|
||||||
msi_reg_set_val_str( userdata, feature->Feature, data );
|
msi_reg_set_val_str( userdata, feature->Feature, data );
|
||||||
msi_free(data);
|
msi_free(data);
|
||||||
|
|
||||||
|
@ -3837,7 +3831,6 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
RegCloseKey(hkey);
|
|
||||||
RegCloseKey(hukey);
|
RegCloseKey(hukey);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2522,13 +2522,7 @@ static void test_publish_publishfeatures(void)
|
||||||
ok(delete_pf("msitest", FALSE), "File not installed\n");
|
ok(delete_pf("msitest", FALSE), "File not installed\n");
|
||||||
|
|
||||||
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, featkey, &hkey);
|
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, featkey, &hkey);
|
||||||
todo_wine
|
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
|
||||||
{
|
|
||||||
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (res == ERROR_SUCCESS)
|
|
||||||
RegCloseKey(hkey);
|
|
||||||
|
|
||||||
res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey);
|
res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey);
|
||||||
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
Loading…
Reference in New Issue