Do not change a features state to Advertise if it explicitly disallows

it.
This commit is contained in:
Aric Stewart 2005-06-02 15:16:31 +00:00 committed by Alexandre Julliard
parent ca8c4e4105
commit 54ba7b9338
1 changed files with 5 additions and 0 deletions

View File

@ -7789,6 +7789,11 @@ UINT WINAPI MSI_SetFeatureStateW(MSIPACKAGE* package, LPCWSTR szFeature,
if (index < 0)
return ERROR_UNKNOWN_FEATURE;
if (iState == INSTALLSTATE_ADVERTISED &&
package->features[index].Attributes &
msidbFeatureAttributesDisallowAdvertise)
return ERROR_FUNCTION_FAILED;
package->features[index].ActionRequest= iState;
package->features[index].Action= iState;