| Previous | Next |
| WCM_E_NOTPOSITIONED | WCM_E_INVALIDPATH |
WCM_E_READONLYITEM
WCM_E_READONLYITEM is the failure HRESULT 0x8022000A (signed decimal -2145255414, unsigned decimal 2149711882). Its severity bit is 1, facility is 34 (FACILITY_STATE_MANAGEMENT), and the facility-specific code field is 0x000A.
AllStat records the Windows SDK description as “Cannot update a read-only setting or attribute.”
Exact meaning and contract boundary
The selected SMI item cannot be modified. The operation reached SetValue, removal, creation, revert, or attribute mutation after an item was resolved. The first branch to test is whether the namespace was opened with read-only access; keep that separate from the possibility that metadata marks the setting or attribute as immutable.
Where the result appears
At this boundary, capture namespace access flags and target mode, then correlate it with item setting type, attributes, and writable restrictions. Assign ownership only after checking the exact mutating method and relative path.
Likely cause branches
- the namespace was opened with read-only access
- metadata marks the setting or attribute as immutable
- the target mode exposes the item for inspection but not modification
- the caller attempts to modify schema metadata rather than mutable setting state
Evidence that resolves the ambiguity
- namespace access flags and target mode
- item setting type, attributes, and writable restrictions
- the exact mutating method and relative path
- whether the same object came from a read-only engine/context
- ownership of the setting: deployment-time, component-managed, or user-modifiable
Diagnostic sequence
- reopen the namespace with the documented write mode only when the scenario supports writes
- do not cast away read-only intent by reaching directly into the backing store
- separate metadata inspection from settings mutation
- route component-owned changes through the supported component mechanism
- fail early in tooling when the authoring model marks an item immutable
Retry and recovery
Retry only after obtaining a writable namespace or selecting a mutable item. Administrator privileges alone do not change the schema’s read-only contract.
Difference from nearby WCM results
WCM_E_KEYNOTCHANGEABLE applies specifically to the key member of an existing list element. READONLYITEM covers broader item/attribute or namespace write restrictions.
Practical scenario
A deployment analyzer opens a namespace for read-only inspection, then reuses the same ISettingsItem to call SetValue. The object correctly refuses the mutation.
Logging and engineering guidance
For operational telemetry, retain the exact mutating method and relative path; also record whether the same object came from a read-only engine/context. Preserve a redacted summary of ownership of the setting: deployment-time, component-managed, or user-modifiable; 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: ISettingsItem::GetPath.
- Microsoft: ISettingsItem::RemoveSettingByPath.
Looking for a different code? Search another status or error code.