| Previous | Next |
| WCM_E_ATTRIBUTENOTFOUND | WCM_E_INVALIDVALUE |
WCM_E_ATTRIBUTENOTALLOWED
WCM_E_ATTRIBUTENOTALLOWED is the failure HRESULT 0x80220004 (signed decimal -2145255420, unsigned decimal 2149711876). Its severity bit is 1, facility is 34 (FACILITY_STATE_MANAGEMENT), and the facility-specific code field is 0x0004.
AllStat records the Windows SDK description as “Attribute is not allowed.”
Meaning in Settings Management Infrastructure
The metadata context does not permit this attribute. The operation reached validation or mutation of an attribute whose name may be known but whose use is not legal on the current element. The first branch to test is whether the attribute belongs to a different SMI element type; keep that separate from the possibility that two attributes form a combination that the schema explicitly excludes.
Point of failure
At this boundary, capture element name, item path, attribute name, and supplied lexical value, then correlate it with setting type and namespace version resolved by SMI. Assign ownership only after checking the full attribute set on the same element, not only the rejected field.
Causes to test independently
- the attribute belongs to a different SMI element type
- two attributes form a combination that the schema explicitly excludes
- a read-only or compiler-owned attribute is being supplied by customization tooling
- legacy metadata includes an attribute removed from the target schema revision
Data to collect
- element name, item path, attribute name, and supplied lexical value
- setting type and namespace version resolved by SMI
- the full attribute set on the same element, not only the rejected field
- ISettingsResult source line and context around the declaration
- comparison with metadata emitted by the target Windows image tools
Step-by-step diagnosis
- remove the attribute and validate the smallest affected element
- verify whether the intended behavior is represented by a different supported attribute
- avoid copying attributes between unrelated setting types
- update the manifest compiler or schema package used by the authoring pipeline
- rerun validation before applying any settings to the target image
Recovery strategy
This is deterministic schema feedback. Retry only after removing, relocating, or replacing the disallowed attribute.
What this value does not mean
WCM_E_ATTRIBUTENOTFOUND is a failed lookup. WCM_E_INVALIDATTRIBUTECOMBINATION concerns individually recognizable attributes that cannot coexist. This value rejects the attribute in the current context.
Illustrative scenario
An authoring tool copies a handler-only attribute onto a plain scalar setting. SMI parses the XML but refuses that attribute on the scalar node.
Implementation guidance
For operational telemetry, retain the full attribute set on the same element, not only the rejected field; also record ISettingsResult source line and context around the declaration. Preserve a redacted summary of comparison with metadata emitted by the target Windows image tools; use a cryptographic hash when that evidence is a file, stream, or generated artifact.
Official Microsoft references.
- Microsoft: SMI error and success constants.
- Microsoft: Settings Management Infrastructure API.
- Microsoft: SMI interfaces.
- Microsoft: ISettingsContext::Deserialize.
- Microsoft: ISettingsResult::GetLine.
Looking for a different code? Search another status or error code.
