I couldn’t find this error blogged anywhere else at the time, so thought I’d do a quick post on it.

When using the click-to-run C2R installer setup.ex from the Office Deployment Tool ODT, I was getting error 30050-1039:

office proplus error

This error seemed to appear because of the RemoveMSI property in the ODT Configuration.xml:

<Configuration>  
 <Add OfficeClientEdition="32" Channel="Broad" OfficeMgmtCOM="TRUE">  
  <Product ID="O365ProPlusRetail">  
   <Language ID="en-us" />  
   <ExcludeApp ID="Groove" />  
  </Product>  
 </Add>  
 <RemoveMSI All="True" />  
 <Property Name="FORCEAPPSHUTDOWN" Value="True"/>  
 <Property Name="SharedComputerLicensing" Value="0" />  
 <Property Name="PinIconsToTaskbar" Value="FALSE" />  
 <Display Level="None" AcceptEULA="TRUE" />  
 <Logging Level="Standard" Path="C:\Temp"/>  
</Configuration>

In the Office 365 ODT logs I was getting errors like:

MSIScrub::MSIUninstaller
MSI product uninstallation failed with exit code","productId":"Office16.VISSTD","exitCode":"30066"

So it was clear from this it wasn’t able to uninstall my Visio 2016 Standard installation. I wasn’t sure if the packaging team had created un-supported MSI based modification to the Visio Std package, but I didn’t want to use the OffScrubC2R.vbs to workaround the error, I wanted to try and detect and repair the issue on multiple machines in advance.

In the c:\windows\temp\SetupExe(201*).log I was getting this error:

[20160] Error: The setup.xml file at: C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE16\Office Setup Controller\Visio.en-us\setup.xml does not exist but is referenced in the ARP entry, therefore transition to MMode is unsafe: VISSTD Type: 27::InstalledProductStateCorrupt.

Strange, the Visio.en-us folder didn’t exist. I copied the “C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE16\Office Setup Controller\VISSTD” folder and renamed it to Visio.en-us and re-ran the ODT setup.exe.

Next error in the SetupExe(201*).log:

Error: The install state of the ProductCode {90160000-0054-0409-0000-0000000FF1CE} , which is referenced in the ProductCodes registry value, is not INSTALLSTATE_DEFAULT. The install state state is -1. Therefore transition to MMode is unsafe for product: VISSTD Type: 27::InstalledProductStateCorrupt.

Checking the Registry key:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Office16.VISSTD I could see the {90160000-0054-0409-0000-0000000FF1CE} ProductCode was listed:

O365 proplus install 3

I removed it from the list. Now you may think this would effect the uninstall of this MSI (which in my case was the core Visio install), but it didn’t.

I re-ran the ODT setup.exe and the previous Office install (Office 2016 Professional MSI edition) was completely uninstalled without error, finally.