logo
search
Product Key Issues

How to Remove an Old Microsoft Office Product Key Before Installing Office 2024

Aamir Naveed AkramAamir Naveed Akram Sep 29, 2026 872 views

Question details

The user needs to clear out an old Microsoft Office product key that is interfering with the activation or installation of a new Office 2024 setup.

How to Remove an Old Microsoft Office Product Key Before Installing Office 2024
Product
Microsoft Office
Device & OS
Windows
Scenario
Preparing to install and activate Office 2024 on a system that previously had an older version of Office installed.
Observed behavior
Older Office product keys remain installed on the system and interfere with the activation of a newly installed Office 2024.
Before you start

Ensure you are logged into your Windows computer with an administrator account, as you will need elevated privileges to run commands that modify Office licensing.

Solution 1Recommended

Use the OSPP.VBS Script via Command Prompt

Use the built-in Microsoft Office licensing script to locate the last five characters of your old key and uninstall it from your system.

The OSPP.VBS script is a command-line tool provided by Microsoft to manage volume activation of Office products. Running this script allows you to view currently installed keys and safely remove them.

1
Open Command Prompt as Administrator

Click the Start menu, type 'cmd' or 'Command Prompt', right-click the application, and select 'Run as administrator'.

2
Display Installed Product Keys

In the Command Prompt window, type the following command and press Enter: cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus

3
Locate the Key Characters

Review the output text to find the line that reads 'Last 5 characters of installed product key'. Note down these five characters.

4
Remove the Old Product Key

Type the removal command, replacing XXXXX with the five characters you just noted: cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /unpkey:XXXXX

Use the OSPP.VBS Script via Command Prompt
Adjusting the Installation Path: If you are running a 32-bit version of Office on a 64-bit version of Windows, your installation path will be 'C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS'.
Free Microsoft Office alternative

Avoid Activation Hassles with WPS Office

If you want to avoid dealing with complex product keys and command-line scripts, consider switching to WPS Office. It provides a lightweight, free, and highly compatible alternative to Microsoft Office that is ready to use immediately.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install the Software: Run the setup file and follow the straightforward on-screen prompts to complete the installation in seconds.
  3. 3. Start Creating: Open WPS Office and immediately begin working on your documents, spreadsheets, and presentations.
Free to use with no complex product keys or activation scripts required.Seamless Microsoft Office format compatibility for Word, Excel, and PowerPoint (.docx, .xlsx, .pptx).Lightweight design that installs quickly and runs smoothly on older devices.Familiar user interface makes migration easy with zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my new Office 2024 failing to activate?

Activation failures can occur if an older Office product key is still registered on your system, creating a conflict. Using the OSPP.VBS script to remove the lingering key usually resolves this issue.

Where is the OSPP.VBS script located?

For newer versions of Office, the script is typically found in 'C:\Program Files\Microsoft Office\Office16'. If you installed a 32-bit version of Office on a 64-bit Windows system, look in the 'Program Files (x86)' directory.

Will removing the product key uninstall my Microsoft Office applications?

No. Running the /unpkey command only removes the activation license from your system. Your applications and local files remain untouched, allowing you to enter a new product key when ready.