Unable to install Cumulative Update on the Exchange server 2013 server. Error: Couldn't remove product with code c3f10d8c-bd70-4516-b2b4-bf6901980741

I recently came up with a case where the customer was not able to install CU18 on a Exchange 2013 server.
We were getting the following error while installing the CU

Error:
=======
Mailbox role: Transport service                           FAILED
The following error was generated when "$error.Clear();
uninstall-MsiPackage -ProductCode '{C3F10D8C-BD70-4516-B2B4-BF6901980741}' -LogFile ($RoleSetupLoggingPath + "\UninstallASDat.msilog")" was run: "Microsoft.Exchange.Configuration.Tasks.TaskException: Couldn't remove product with code c3f10d8c-bd70-4516-b2b4-bf6901980741. The installation source for this product is not available. Verify that the source exists and that you can access it. Error code is 1612. ---> System.ComponentModel.Win32Excep
tion: The installation source for this product is not available. Verify that the source exists and that you can access it   --- End of inner exception stack trace ---   at Microsoft.Exchange.Configuration.Tasks.Task.ThrowError(Exception exception, ErrorCategory errorCategory, Object target, String helpUrl)   at Microsoft.Exchange.Management.Deployment.UninstallMsi.RemoveProductCode(Guid productCode)   at Microsoft.Exchange.Management.Deployment.UninstallMsi.InternalProcessRecord()   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__b()   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".

 

We could see the following error in the Exchange setup logs:
============================================

Type library exporter warning processing 'Microsoft.Exchange.Data.Transport.Interop.IProxyCallback.SetWriteStream(writeStream), Microsoft.Exchange.Transport.Agent.ContentFilter.ComInterop'. Warning: Type library exporter could not find the type library for 'System.Runtime.InteropServices.ComTypes.IStream'.  IUnknown was substituted for the interface.
Assembly exported to 'C:\Program Files\Microsoft\Exchange Server\V15\Bin\ComInterop.tlb', and the type library was registered successfully

[01/06/2018 01:31:27.0669] [2] Process standard error:
[01/06/2018 01:31:27.0681] [2] Ending processing register-ComInteropTLB
[01/06/2018 01:31:27.0689] [1] Executing:
uninstall-MsiPackage -ProductCode '{C3F10D8C-BD70-4516-B2B4-BF6901980741}' -LogFile ($RoleSetupLoggingPath + "\UninstallASDat.msilog")

[01/06/2018 01:31:27.0705] [2] Active Directory session settings for 'Uninstall-MsiPackage' are: View Entire Forest: 'True', Configuration Domain Controller: 'DC.domain.com', Preferred Global Catalog: 'DC.domain.com', Preferred Domain Controllers: '{ 'DC.domain.com' }'
[01/06/2018 01:31:27.0706] [2] User specified parameters:  -ProductCode:'c3f10d8c-bd70-4516-b2b4-bf6901980741' -LogFile:'C:\ExchangeSetupLogs\UninstallASDat.msilog'
[01/06/2018 01:31:27.0706] [2] Beginning processing uninstall-MsiPackage
[01/06/2018 01:31:27.0723] [2] Removing MSI package with code 'c3f10d8c-bd70-4516-b2b4-bf6901980741'.

 

The CU was looking for Exchange 2007 Anti-Spam agents file.
ASDat.MSI
ASEntIRS.MSI

In order to fix the issue, we used the Msizap.exe file from the Windows SDK kit.

We downloaded the Windows SDK kit from following location
https://www.microsoft.com/en-us/download/details.aspx?id=6510

We then pointed the command prompt to the location of Msizap.exe and executed the following command to all the components of Exchange 2007 Anti-Spam from the box.

Msizap.exe T {C3F10D8C-BD70-4516-B2B4-BF6901980741}
Msizap.exe T {14F288C7-C695-40D5-971D-8890605C6040}
Msizap.exe T {93FCFF43-49E2-4AE5-9AD4-0256878AB886}

We once again started the CU update and it was successfully installed.

Hope this helps !!!

 

-Raghav