| Previous | Next |
| WCM_E_READONLYITEM | WCM_E_WRONGESCAPESTRING |
WCM_E_INVALIDPATH
WCM_E_INVALIDPATH is the failure HRESULT 0x8022000B (signed decimal -2145255413, unsigned decimal 2149711883). Its severity bit is 1, facility is 34 (FACILITY_STATE_MANAGEMENT), and the facility-specific code field is 0x000B.
AllStat records the Windows SDK description as “Name or path of a state node is in invalid format.”
What the HRESULT establishes
The settings path has invalid syntax. The operation reached parsing a path supplied to GetSettingByPath, CreateSettingByPath, RemoveSettingByPath, or related navigation. The first branch to test is whether separators or keyed-list syntax were constructed manually; keep that separate from the possibility that an absolute path is passed where a path relative to the current item is required.
Processing stage
At this boundary, capture the exact UTF-16 path before any logging escaping, then correlate it with current item path and the API’s relative/absolute expectation. Assign ownership only after checking whether the path originated from ISettingsItem::GetPath.
Failure patterns to separate
- separators or keyed-list syntax were constructed manually
- an absolute path is passed where a path relative to the current item is required
- a path returned by SMI was decoded, normalized, or concatenated as ordinary filesystem text
- empty segments, malformed keys, or unsupported attribute notation are present
Capture these facts first
- the exact UTF-16 path before any logging escaping
- current item path and the API’s relative/absolute expectation
- whether the path originated from ISettingsItem::GetPath
- XML escaping and unescaping performed by intermediate layers
- the parent/list schema used to interpret keyed segments
A safe investigation order
- preserve paths returned by GetPath as opaque values
- build relative operations from resolved ISettingsItem objects where possible
- validate list keys with schema-aware APIs instead of string formatting
- remove filesystem canonicalization from SMI paths
- test the final path against a known-good target namespace
Recovery conditions
Fix the path representation before retrying. A new engine or elevated token cannot make malformed path grammar valid.
Do not confuse it with adjacent codes
WCM_E_WRONGESCAPESTRING isolates an invalid XML escape; WCM_E_INVALIDKEY isolates a key/schema mismatch. INVALIDPATH is the broader path-grammar failure.
Deployment example
A tool joins an SMI parent path using a backslash routine intended for files. The resulting text looks plausible in logs but violates SMI path syntax.
Telemetry fields worth retaining
For operational telemetry, retain whether the path originated from ISettingsItem::GetPath; also record XML escaping and unescaping performed by intermediate layers. Preserve a redacted summary of the parent/list schema used to interpret keyed segments; 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.