How to Use Office Deployment Tool to Remove a Trial Before Office 2024
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.
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.
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.
Open a text editor like Notepad and create a new file, or open your existing ODT XML configuration file.
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.
Save the document as uninstall_and_install.xml in the exact same folder directory where your ODT setup.exe is located.
Search for cmd in the Windows Start menu, right-click on Command Prompt, and select 'Run as administrator'.
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.

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. Download the Installer: Visit the official WPS website and download the free installation package.
- 2. Run the Setup: Double-click the downloaded executable file. No complicated XML configuration is required.
- 3. Follow the Wizard: Click through the straightforward one-click installation wizard to set up the software in seconds.
- 4. Start Working: Open WPS Office and instantly view, edit, or create your documents with full Microsoft format compatibility.

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.




