logo
search
Uninstall & Reinstall Issues

How to Use Office Deployment Tool to Remove a Trial Before Office 2024

Khadija KhanKhadija Khan Sep 27, 2026 871 views

Question details

The user needs to automate the removal of preinstalled Microsoft 365 or OneNote trials using the Office Deployment Tool before deploying Office ProPlus 2024.

Product
Microsoft Office Deployment Tool
Device & OS
Windows
Scenario
Deploying a new volume license of Office ProPlus 2024 on a machine that already has a trial version of Microsoft 365 or other Click-to-Run products installed.
Observed behavior
Preinstalled Click-to-Run products remain on the system and can conflict with the new Office ProPlus 2024 installation unless explicitly removed during the deployment process.
Before you start

Ensure you have downloaded the latest version of the Office Deployment Tool from the Microsoft Download Center and have administrative privileges on the target Windows machine.

Solution 1Recommended

Configure the ODT XML File to Remove Previous Versions

Modify your ODT configuration XML to include a Remove element before the Add element, which automates the uninstallation of existing products.

By placing a <Remove> element before the <Add> element in your XML configuration, the Office Deployment Tool will process the uninstallation of specified (or all) existing Click-to-Run products before it begins installing Office ProPlus 2024. This ensures a clean installation environment and prevents application conflicts.

1
Open your configuration file

Open a text editor like Notepad and create a new file, or open your existing ODT XML configuration file.

2
Add the Remove element

Insert the tag <Remove All="True" /> immediately before the <Add> element that defines your ProPlus2024Volume installation. Alternatively, specify exact Product IDs if you do not want to remove everything.

3
Save the XML file

Save the document as uninstall_and_install.xml in the exact same folder directory where your ODT setup.exe is located.

4
Run Command Prompt as Administrator

Search for cmd in the Windows Start menu, right-click on Command Prompt, and select 'Run as administrator'.

5
Execute the deployment command

In the Command Prompt, navigate to your ODT folder using the cd command, then type setup.exe /configure uninstall_and_install.xml and press Enter.

Configure the ODT XML File to Remove Previous Versions
Test Carefully: The <Remove All="True" /> command will uninstall all existing Click-to-Run Office products. Test this configuration on a single machine first to ensure you do not accidentally remove applications you intend to keep.
Free Microsoft Office alternative

Switch to WPS Office for a Hassle-Free Deployment

If managing complex XML configurations and deployment tools for Microsoft Office is too tedious, consider deploying WPS Office. It provides a lightweight, highly compatible, and easy-to-manage alternative for enterprise and personal use without the need for extensive scripts.

  1. 1. Download the Installer: Visit the official WPS website and download the free installation package.
  2. 2. Run the Setup: Double-click the downloaded executable file. No complicated XML configuration is required.
  3. 3. Follow the Wizard: Click through the straightforward one-click installation wizard to set up the software in seconds.
  4. 4. Start Working: Open WPS Office and instantly view, edit, or create your documents with full Microsoft format compatibility.
Seamlessly compatible with Microsoft Office formats like Word, Excel, and PowerPointLightweight installation package that avoids the need for complex deployment toolsAll-in-one intuitive interface combining documents, spreadsheets, and presentationsFree to download and use, saving on expensive volume licensing costs
microsoft office alternative - wps office

Frequently Asked Questions

Can I remove specific Office products instead of all of them?

Yes. Instead of using the All="True" attribute, you can specify individual Product IDs within the <Remove> element, such as <Product ID="O365ProPlusRetail" />, to target only specific applications while leaving others intact.

What happens if I don't remove the preinstalled trial before installing Office 2024?

Failing to remove a preinstalled Microsoft 365 or Click-to-Run trial can lead to installation errors, activation conflicts, or having multiple redundant Office versions installed on the same machine.

Does the Remove command uninstall older MSI-based Office versions?

No, the <Remove> element in ODT primarily manages Click-to-Run installations. To remove older MSI-based installations (like Office 2016 or older), you should use the <RemoveMSI /> element in your configuration file.

Where do I download the Office Deployment Tool?

You can download the latest version of the Office Deployment Tool directly from the official Microsoft Download Center. It downloads as a self-extracting executable containing the setup.exe file and sample XML files.