Introduction

Recently I (and some customers) have received new laptops from a vendor (who shall remain nameless) containing an unusual version of Office. We know that convincing vendors to provide Windows vanilla with laptops (apart from Microsoft) is almost utopian, but they normally ship their Windows with some weird MSI-based Office or most commonly the store version Microsoft 365 (Office), but not this time. This time something else was happening, resulting in users having two versions of Office 365 after provisioning.

The usual combo

Our Office installations normally consist of

  • Microsoft 365 Apps built-in on Intune, configuring Remove other versions to Yes.
  • Acquiring Microsoft 365 (Office) store version via Intune - Microsoft Store app (new) and assigning as uninstall with intent required to all devices.

The perpetrator

Upon checking one affected device and checking the Windows registry it was clear the app was installed using Click to Run, and since click to run can only be uninstalled using click to run, I had to change my approach.

The option to use the designer does not support removing other “click to run” products, so I have replaced it with the XML one and added the following lines:

  <Remove All="FALSE">
    <Product ID="O365HomePremRetail" />
  </Remove>

My final XML file for reference:

<Configuration ID="2d8a9c05-bcad-4c32-a011-af6fb03c114e">
  <Add OfficeClientEdition="64" Channel="MonthlyEnterprise">
    <Product ID="O365ProPlusRetail">
      <Language ID="MatchOS" />
      <ExcludeApp ID="Groove" />
      <ExcludeApp ID="Lync" />
      <ExcludeApp ID="Access" />
    </Product>
    <Product ID="LanguagePack">
      <Language ID="MatchOS" />
    </Product>
  </Add>
  <Remove All="FALSE">
    <Product ID="O365HomePremRetail" />
  </Remove>
  <Property Name="SharedComputerLicensing" Value="0" />
  <Property Name="FORCEAPPSHUTDOWN" Value="FALSE" />
  <Property Name="DeviceBasedLicensing" Value="0" />
  <Updates Enabled="TRUE" />
  <RemoveMSI />
  <AppSettings>
    <User Key="software\microsoft\office\16.0\excel\options" Name="defaultformat" Value="51" Type="REG_SZ" App="excel16" Id="L_SaveExcelfilesas" />
    <User Key="software\microsoft\office\16.0\powerpoint\options" Name="defaultformat" Value="27" Type="REG_DWORD" App="ppt16" Id="L_SavePowerPointfilesas" />
    <User Key="software\microsoft\office\16.0\word\options" Name="defaultformat" Value="" Type="REG_SZ" App="word16" Id="L_SaveWordfilesas" />
  </AppSettings>
  <Display Level="none" AcceptEULA="TRUE" />
</Configuration>

The “Product ID” to be removed should match the product installed (as per registry name or ‘productstoremove’ under UninstallString). All the supported Product IDs can be found here.

I hope that was informative and thanks for reading.

Updated:

Comments