Uninstall legacy versions of Office when deploying Office 365 Pro Plus

deploymentmicrosoft-office-2013microsoft-office-365

In volume licensed editions of Office (ones with an MSI deployment), you can use OCT to create a package that will remove previous versions of Office when the new version is deployed.

Office 365 Pro Plus is Click-to-Run only, which means that OCT will not work with it. ODT allows for some customization of Office 365 Pro Plus, but appears to lack the ability to remove previous versions of Office.

Is there a way to do this native to the Office 365 Pro Plus deployment, or does this really involve creating a script to check for every possible version of Office along with uninstall logic?

Best Answer

Have you tried using wmic? You could use wildcard operators, and tune them to catch whatever programs you'd like to remove.

For instance, try

wmic product where "name like '%Office%'"

You should catch most of what you're looking to remove. You could tune it further to search specifically for the versions or components of Office you know the machines have installed, but it would be likely fine (after checking a couple cases) to have the 'Office' wildcard blast through; definitely doublecheck though!

So just script up something like this:

wmic product where "name like '%Microsoft Office%'" call uninstall /nointeractive

After you know you have your where clause tuned to catch just what you want. To avoid any issues, you can make it as specific of a query as you want.

Related Topic