Do not change a features state to Advertise if it explicitly disallows
it.
This commit is contained in:
parent
ca8c4e4105
commit
54ba7b9338
|
@ -7789,6 +7789,11 @@ UINT WINAPI MSI_SetFeatureStateW(MSIPACKAGE* package, LPCWSTR szFeature,
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
return ERROR_UNKNOWN_FEATURE;
|
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].ActionRequest= iState;
|
||||||
package->features[index].Action= iState;
|
package->features[index].Action= iState;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue