Exchange 2016 Troubleshooting: Security update (KB4540123) fails to install

Issue

At a client recently we had an Exchange 2016 Server that would not install the March 2020 Security update. The setup would start and then end with the error below after a few minutes:

Error

Error message

Product: Microsoft Exchange Server - Update '{09813FB7-2631-4872-A099EED24C15D17A}' could not be installed. Error code 1642. Windows Installer can create logs for help troubleshoot issues with installing software packages. Use the following link for instructions on turning on loggin support: http://go.microsoft.com/fwlink/?LinkId=23127

Eventviewer

https://www.collaborationpro.com/wp-content/uploads/2020/03/image.png

Troubleshooting

Error 1642 generally implies that it cannot find the version installed. Even though we had Exchange 2016 CU15 installed (as per programs and features), there was a security update for Exchange 2016 CU14 listed.

Solution

We removed the update and re-ran CU15 and after the installation and reboot we were able to install the KB above.