Change your Office product key

This article applies only to one-time purchases of Office 2016 or Office 2013, such as Office Home & Student, Office Home & Business, Office Professional, or individual Office applications.

If you bought multiple copies of Office and used the same Install button to install Office on multiple PCs, activation fails on the other PCs. This happens because each Install button is associated with a unique product key that can only be installed on one PC.

To fix this, you can change the product key for the other PCs where you installed Office. Select a method for changing the product key on the tabs below.

  1. Uninstall Office from the PC where activation is failing. To do this, see Uninstall Office 2016, Office 2013, or Office 365 from a PC.

  2. On the PC where you uninstalled Office, sign in to your My Office Account page with the email and password associated with the Microsoft account that was used to install Office.

  3. Reinstall Office by selecting the Install button for a one-time purchase that hasn't been activated. For help with installing Office, see Install Office on your PC or Mac.

After you change your product key, we recommend that you create a list to manage the product keys that you've installed. To learn how, see Manage multiple one-time-purchase Office installs that use the same Microsoft account.

  1. Sign in to your My Office Account page with the email and password associated with the Microsoft account that was used to install Office.

    After you sign in, you should see a list of Office products that are associated with your Microsoft account.

  2. For the first product that's listed on the page, select View your product key. Copy or write down the product key. This is likely the product key that was used multiple times to install Office.

  3. Select View your product key for the remaining Office products and copy or write them down. These are likely the keys that you'll use to replace the key that was used multiple times.

  4. On a PC where Office activation is failing, open the Command Prompt as described below:

    Windows 10 and Windows 8.1   

    Windows 7   

    1. Select the Start button Windows Start button in Windows 8 and Windows 10 (lower-left corner).

    2. Type Command Prompt.

    3. Right-click the Command Prompt icon, and select Run as administrator.

    1. Select the Start button Windows 7 Start button (lower-left corner).

    2. Right-click Command Prompt and select Run as administrator.

  5. From the drop-down list below, select your Office version (2013 or 2016) and Windows version (32-bit or 64-bit) and run the commands as described.

    Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.

    1. Copy the following command, paste the command into the Command Prompt window, and then press Enter.

      cscript “C:\Program Files\Microsoft Office\Office16\OSPP.VBS” /dstatus

      The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.

      Command Prompt showing last five digits of product key

    2. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.

      cscript “C:\Program Files\Microsoft Office\Office16\OSPP.VBS” /unpkey:XXXXX

    3. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.

      cscript “C:\Program Files\Microsoft Office\Office16\OSPP.VBS” /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

    Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.

    1. Copy the following command, paste the command into the Command Prompt window, and then press Enter.

      cscript “C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS” /dstatus

      The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.

      Command Prompt showing last five digits of product key

    2. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.

      cscript “C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS” /unpkey:XXXXX

    3. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.

      cscript “C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS” /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

    Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.

    1. Copy the following command, paste the command into the Command Prompt window, and then press Enter.

      cscript “C:\Program Files\Microsoft Office\Office16\OSPP.VBS” /dstatus

      The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.

      Command Prompt showing last five digits of product key

    2. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.

      cscript “C:\Program Files\Microsoft Office\Office16\OSPP.VBS” /unpkey:XXXXX

    3. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.

      cscript “C:\Program Files\Microsoft Office\Office16\OSPP.VBS” /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

    Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.

    1. Copy the following command, paste the command into the Command Prompt window, and then press Enter.

      cscript “C:\Program Files\Microsoft Office\Office15\OSPP.VBS” /dstatus

      The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.

      Command Prompt showing last five digits of product key

    2. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.

      cscript “C:\Program Files\Microsoft Office\Office15\OSPP.VBS” /unpkey:XXXXX

    3. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.

      cscript “C:\Program Files\Microsoft Office\Office15\OSPP.VBS” /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

    Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.

    1. Copy the following command, paste the command into the Command Prompt window, and then press Enter.

      cscript “C:\Program Files (x86)\Microsoft Office\Office15\OSPP.VBS” /dstatus

      The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.

      Command Prompt showing last five digits of product key

    2. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.

      cscript “C:\Program Files (x86)\Microsoft Office\Office15\OSPP.VBS” /unpkey:XXXXX

    3. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.

      cscript “C:\Program Files (x86)\Microsoft Office\Office15\OSPP.VBS” /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

    Tip: If you get an Input Error: Can not find script file... message, it means that you used the wrong command. Don’t worry, running the wrong command won’t hurt anything. Double-check your Office and Windows versions and try a different command.

    1. Copy the following command, paste the command into the Command Prompt window, and then press Enter.

      cscript “C:\Program Files\Microsoft Office\Office15\OSPP.VBS” /dstatus

      The command prompt displays the last five characters of the product key that was used to install Office on the PC. Our example below uses XXXXX to represent these characters.

      Command Prompt showing last five digits of product key

    2. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX with the last 5 digits of the product key that was shown in the previous step. Press Enter to remove the product key.

      cscript “C:\Program Files\Microsoft Office\Office16\OSPP.VBS” /unpkey:XXXXX

    3. Copy the following command, paste the command into the Command Prompt window, and replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with an unused product key from your list. Press Enter to change the key.

      cscript “C:\Program Files\Microsoft Office\Office15\OSPP.VBS” /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

    Tips: 

  6. Now start an Office app, such as Word, and select Next to activate Office over the Internet.

  7. Repeat this process for each PC where activation is failing.

After you change your product key, we recommend that you create a list to manage the product keys that you've installed. To learn how, see Manage multiple one-time-purchase Office installs that use the same Microsoft account.

Expand your skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×