What does HRESULT 0x8004E104 (SL_E_SFS_BAD_TOKEN_NAME) mean?

 
Previous Next
SL_E_SFS_INVALID_SYNC SL_E_SFS_BAD_TOKEN_EXT

SL_E_SFS_BAD_TOKEN_NAME

The protected licensing boundary behind the code

Keep the symbolic result SL_E_SFS_BAD_TOKEN_NAME together with HRESULT 0x8004E104. The producer is the serialized Token Store file format; at the low-level reader/writer that validates the Token Store container, descriptor table, token records and transaction state before licenses can be evaluated, Windows determined that a serialized token name violates the naming rules expected by the store index.

For triage, treat this result as a the serialized Token Store file format result. the name is malformed; the extension and payload can still be structurally valid. Product-key changes or network tests are useful only when it evidence points back to those layers.

Where it sits in the licensing pipeline

A structural Token Store error occurs before an individual product key can be accepted or rejected. The decisive proof for this HRESULT is to preserve the raw name length and encoding, descriptor entry and source package that introduced the token.

The documented Tokens.dat rebuild procedure is a recovery action, not the first evidence-gathering step; preserve the original error and licensing inventory first. Keep that product/object identity because the same service can expose several independent licensing instances.

Minimum data for a reliable diagnosis

ItemWhy it matters here
descriptor table and token offsetsShows the state transition immediately before the HRESULT.
token name, extension, declared size and hashCorrelates service-level evidence with storage, crypto or policy evidence.
file-system result and Software Protection eventReveals whether servicing, migration, restore, cloning or concurrent work changed the precondition.
Tokens.dat or the applicable licensing-store fileIdentifies the protected object or product instance that returned the code.
store header and format versionSeparates format/version failure from damage, absence or access failure.

Code-specific check: preserve the raw name length and encoding, descriptor entry and source package that introduced the token.

From HRESULT to a verified cause

  1. Record this result, 0x8004E104, the exact API or service operation, and the affected product or protected object.
  2. capture the five state items above before restarting the service, rebuilding the store, repairing files or retrying activation.
  3. prove the specific condition: preserve the raw name length and encoding, descriptor entry and source package that introduced the token.
  4. compare the neighboring results below and identify which boundary is actually present.
  5. change one decisive precondition, repeat the original operation, and verify both the immediate HRESULT and durable license state.

Why the symbolic code matters

ResultDifferent condition
SL_E_SFS_BAD_TOKEN_EXTCompared with this result, a token record carries an unsupported or malformed extension/type suffix.
SL_E_SFS_INVALID_SYNCCompared with this result, a token record does not have a matching or valid synchronization marker at its header and footer.
SL_E_SFS_DUPLICATE_TOKEN_NAMECompared with it, two descriptor entries resolve to the same token name where the store requires uniqueness.

Safe recovery direction

Remove or reinstall the responsible signed license package through supported licensing tools, then refresh evaluation. Preserve the original store, event export, hashes and licensing inventory until the operation succeeds and the expected state survives any required restart.

Representative case: A malformed migration package creates a token record with an empty or invalid name component.

Actions that usually destroy useful evidence

  • do not editing or copying individual records inside the signed store.
  • do not assuming a product-key change can repair a malformed container.
  • While resolving it, do not use unofficial activation tools, patched binaries, copied stores, disabled integrity checks or hand-edited signed data; they can create a second tamper condition.

Verification after correction

Repeat the operation that originally produced it, not merely a UI refresh. Confirm the exact product/object completes, review LicenseStatus and LicenseStatusReason when applicable, and check that no related boundary replaces it.

Regression testing, retain one failing fixture that reproduces “a serialized token name violates the naming rules expected by the store index” and one passing fixture that changes only the decisive precondition; this avoids mistaking a broad reset for verification.

Technical references


Looking for a different code? Search another status or error code.