Fix it now
Office is holding a key it cannot match to any licence installed on the machine. Microsoft publishes no description for 0xC004F017, so work from what is verifiable: the product ID a build was deployed with decides which key it will accept, and Microsoft states plainly that the wrong product ID means you cannot activate Office.
cd "C:\Program Files\Microsoft Office\root\Office16"
cscript ospp.vbs /dstatus
cscript ospp.vbs /dstatusall
cscript ospp.vbs /ddescr:0xC004F017
- Read the installed product from File, Account, About in Word, and note the name and version exactly.
/dstatusshows licences with keys installed./dstatusallshows every installed licence, which is what tells you whether a licence for your key exists on this machine at all./ddescr:prints the text your own machine holds for the code, which is the only description Microsoft stands behind.- If the build and the key belong to different channels, redeploy with the product ID your licence matches rather than looking for a command to force it.
A Quick Repair reinstates the file set the installation already had. It does not add a volume licence to a retail build, because that build was never meant to have one.
If a licence now shows against your key you are done. If not, the next section explains the third thing sitting between the installation and the key.
Why it happens
Office licensing has three parts, not two. There is the installation, there is the product key, and between them there is a set of signed licence files describing the products this installation can be licensed as. Those files are placed by setup. When you install a key, the licensing service looks for a licence matching the product the key encodes, and if there is nothing to bind to, the key sits there licensing nothing.
Microsoft does not publish a description for 0xC004F017, so nobody outside Microsoft can tell you precisely which check failed. What it does publish is the mechanism that produces the gap: builds are deployed by product ID, each edition has its own Generic Volume License Key, and “if you use the wrong product ID, you can’t activate Office”. That sentence is the whole article in miniature.
This is why the error is so strongly associated with mixed deployments. A retail build carries retail licences. A volume build deployed with the Office Deployment Tool and a volume product ID carries volume licences. Install a volume key on a retail build and the key is structurally fine, but there is no volume licence for it to attach to. Nothing is corrupt, and repairing Office reinstates the same set of files it had before.
The four companion codes are undocumented too. 0xC004F01C and 0xC004F011 come from the same licensing layer; 0xC004E00C and 0xC004E00D carry the 0xC004E prefix used by the Windows licence store, so seeing them alongside is a hint that the problem is broader than Office. None of the four has a published description, and cscript ospp.vbs /ddescr: will print what your machine says about each.
The build and the key belong to different channels
You have this one if /dstatus names a retail channel while your key came from a volume agreement, or the reverse.
- Uninstall the current build.
- Redeploy with the Office Deployment Tool, naming the product ID that matches the licence you hold: ProPlus2024Volume, Standard2024Volume, ProPlus2021Volume or Standard2021Volume for volume; the Retail product IDs for retail.
- Volume LTSC builds also take their own update channel, PerpetualVL2024 or PerpetualVL2021.
- Install the key with
/inpkey:and activate with/act, or set a KMS host first with/sethst:.
Redeploying sounds heavy-handed and it is still the correct fix. Grafting a volume licence onto a retail build leaves an installation nobody can support later.
The volume build already has a GVLK and you are typing over it
You have this one if The installation is a volume build, /dstatusall lists a licence, and you are entering a key by hand.
- Check first whether the machine is meant to activate against your own infrastructure. Volume Office installs with a Generic Volume License Key that finds a KMS host or Active Directory by itself.
- If it is, point it at the host with
/sethst:and run/actinstead of installing a key. - If it is not, install the MAK you hold with
/inpkey:and activate.
The licence file for the product is not installed
You have this one if The channel matches your key, and /dstatusall lists no licence for the product at all.
- Install the licence with
cscript ospp.vbs /inslic:"<full path to the .xrm-ms file>", which Microsoft documents as installing a licence from a user-provided .xrm-ms file. - The files ship with the installation, so locate them under the Office installation root rather than downloading them from anywhere.
- Install the key and activate.
- If nothing of the kind is present, run an Online Repair from Settings, Apps, the Office entry, then Modify.
You are running ospp.vbs from the wrong folder
You have this one if The commands return nothing useful, or report that no Office installation was found.
- Determine the bitness from File, Account, About.
- Use
Program Files\Microsoft Office\root\Office16for 64-bit Office and theProgram Files (x86)equivalent for 32-bit. - Only older, MSI-based installations use those paths without the
rootsegment. - Re-run
/dstatusfrom the right folder before drawing any conclusion.
Acting on output from the wrong folder is the most common way this investigation goes off course, and it costs an hour every time.
More than one Office version is installed
You have this one if Two generations are present, and the key keeps binding to the one you did not mean.
- List every Office entry in Settings, Apps.
- Remove the versions you are not licensing.
- Re-run
/dstatusand confirm only the intended installation remains, then install the key and activate.
Full reference
Product IDs, and why they decide this
| What you hold | Product ID to deploy |
|---|---|
| A 2024 volume agreement, Professional Plus | ProPlus2024Volume |
| A 2024 volume agreement, Standard | Standard2024Volume |
| A 2021 volume agreement, Professional Plus | ProPlus2021Volume |
| A 2021 volume agreement, Standard | Standard2021Volume |
| A retail Professional Plus 2024 licence | ProPlus2024Retail |
| A retail Home and Business 2024 licence | HomeBusiness2024Retail |
Microsoft’s line accompanying that list is the one to take to whoever built the deployment: if you use the wrong product ID, you cannot activate Office. Nothing about the installed applications looks different, which is why the mistake survives until a key is refused.
Which ospp.vbs switch answers which question
| Switch | What Microsoft says it does | What it tells you here |
|---|---|---|
/dstatus |
Displays licence information for installed product keys | Which keys are installed and what they bound to |
/dstatusall |
Displays licence information for all installed licences | Whether a licence for your key exists at all |
/inslic:<path> |
Installs a licence using the path of a user-provided .xrm-ms licence | Reinstates a licence file that is present but not registered |
/ddescr:<code> |
Displays the description for a supplied error code | The vendor’s own text for an undocumented code |
/unpkey:<last five> |
Uninstalls an installed key by its last five digits | Clears a key that is binding to the wrong product |
/dstatusall is the switch this article turns on and the one most troubleshooting misses. /dstatus only shows licences with a key attached, so an installation with no matching licence looks identical to one you have not looked at properly.
Microsoft 365 Apps is a different problem
Microsoft states that the ospp.vbs script does not work for Microsoft 365 Apps or for subscription versions of Project and Visio. If the applications are the subscription build, none of the commands above apply: the licence comes from the signed-in account and the questions are which account is signed in and whether a licence is assigned to it in the admin centre.
The four codes with no published meaning
| Code | What can honestly be said |
|---|---|
0xC004F017 |
No published description. Read your machine’s text with /ddescr: |
0xC004F01C |
No published description. Same licensing layer |
0xC004F011 |
No published description. Same licensing layer |
0xC004E00C |
No published description. The 0xC004E prefix belongs to the Windows licence store |
0xC004E00D |
No published description. Same store family |
Where the two 0xC004E codes appear alongside the others, look at Windows before you look at Office. Confirm the Software Protection service starts, then run slmgr /dlv and see whether Windows itself reports a full licence status. Office licensing sits on the same platform, and a store failing underneath produces Office errors that look like Office problems.
What repairing Office will and will not do
- A Quick Repair restores the file set the installation already had. It does not create a licence the build never shipped with.
- An Online Repair replaces the installation from source and can restore a licence file that was removed, but it still installs the product ID that is configured, not the one you want.
- Copying licence files between machines does not work. They are signed and tied to the product and channel of the installation that shipped them.
- Uninstalling and redeploying with the correct product ID is the only step that changes which licences the machine has.
When a licence is the actual fix
If working through this shows that the key you hold is for a volume channel with no agreement behind it, or for a product you cannot legitimately install, then the licence itself is the missing piece rather than the licence file. Office 2021 Professional Plus is the usual answer for a machine that needs the full application set on a perpetual licence, and it installs and activates without any of the channel gymnastics above. Arco supplies it, and can look at your /dstatusall output and the product name from your About dialogue and tell you which licence will bind to the installation you already have, rather than the one you would have to rebuild.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0xC004F017 |
Returned when the installed key has no matching licence to bind to. No published description; read your machine’s text with ospp.vbs /ddescr: | not published by the vendor |
0xC004F01C |
Same licensing layer, no published description | not published by the vendor |
0xC004F011 |
Same licensing layer, no published description | not published by the vendor |
0xC004E00C |
Carries the 0xC004E prefix used by the Windows licence store. No published description | not published by the vendor |
0xC004E00D |
Same store family, no published description | not published by the vendor |
Confirm the fix worked
cscript ospp.vbs /dstatuslists a licence with a licensed status.cscript ospp.vbs /dstatusallshows a licence matching the channel your key belongs to.- The licence name agrees with the product name in File, Account, About.
- An Office application opens with no Unlicensed Product wording in the title bar.
- A second machine deployed the same way gives the same result, which is what proves the deployment rather than the machine was the problem.
Questions people ask about this
What does 0xC004F017 mean exactly?
Microsoft does not publish a description for it. Run cscript ospp.vbs /ddescr:0xC004F017 on the machine to read the text Office itself holds. What is documented is the mechanism behind it: builds are deployed by product ID, and the wrong product ID means Office cannot activate.
Will repairing Office install the missing licence?
A Quick Repair restores the file set the installation already had, so usually not. An Online Repair sometimes does. Neither produces a volume licence on a retail build, because that build was never meant to have one.
Can I copy licence files from another machine?
No. They are signed and tied to the product and channel of the installation that shipped them. Copying them leaves an installation nobody can support.
Do I need to buy a different licence?
Only if your key does not correspond to a product you can lawfully install. With a valid volume key and an agreement behind it, redeploying with the right product ID costs nothing but the time.
Why did this appear after a reinstall?
Because the reinstall almost certainly came from a different source. Someone installed a consumer download onto a machine that had been deployed from the volume build, or the reverse, and the product ID changed underneath the key.
