HardenTLS step fails due to missing msi files in SQLServer installation
Symptom
When upgrading PSM from older versions e.g. 11.2 to 12.6 or later, the HardenTLS step fails due to missing msi files in SQLServer installation during PSM upgrade.
This is because older versions of the PSM came packaged with SQL Server 2016 Express Service Pack 1 which is a sunset version (out of support by Microsoft). The HardenTLS step will attempt to upgrade the Service Pack to version 3 which is the latest supported.
In the Install.log and Hardening.log you will see the following entry;
2024-04-04 00:30:27:396 - PSM HardenTLS.psm1 ERR - SQL Server upgrade failed. Exit code: -2068709374 for more information you can see the logs in C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log or look for file SQLEXPR_x64_ENU_decompression_log.log on the machine
Environment
11.2;11.3;11.4;11.5;12.4;12.5;12.6;13.0;13.2;13.1;14.0 Privileged Access Manager (PAM, self-hosted) Privileged Session Management (PSM)
Cause
#The SQL Server Setup is missing important msi files from the installation cache to be able to successfully patch the Service Pack.
You can see the full line from the SQLEXPR_x64_ENU_decompression_log.log here:
"Exit message: The cached MSI file '<drive>:\Windows\Installer\cf6d1072.msi' is missing. Its original file is 'smo_extensions.msi' and it was installed for product 'SQL Server 2016 Express' from 'C:\ProgramData\Package Cache\{B6E1A5EB-1C58-4A04-B76B-E5FE1BE22CA1}v13.0.1601.5\x64\', version '13.0.1601.5', language 'ENU'.
To resolve this problem, recover the missing file from the installation media and start setup again. For more information about how to resolve this problem, see 'Steps to restore the missing Windows Installer cache files'
https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/install/windows/restore-missing-windows-installer-cache-files
Resolution
Follow the steps in the Microsoft documentation below;
https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/install/windows/restore-missing-windows-installer-cache-files
The quickest way to restore the deleted or missing cache .msi files is to download SQL 2016 Server Express installer package and the make use of Solution 2: Use the FixMissingMSI tool.
## FixMissingMSI is a graphical user interface (GUI) tool that enables you to identify and fix the missing MSIs easily. Follow these steps to use it:
-
Prepare or locate the installation media for the SQL Server version(s) you need to fix.
-
Download and extract the media locally on the computer where you may be missing MSI or MSP files. Do this in separate folders for RTM, services packs, or cumulative updates. For example:
OutputCopyc:\sqlsetup\RTM2017 c:\sqlsetup\CU31-
If you downloaded a cumulative update or service pack, be sure to extract it to a folder by using the
ConsoleCopy/Xoption. For example:SQLServer2016SP3-KB5003279-x64-ENU.exe /X -
Choose a directory where to extract the file, for example,
c:\sqlsetup\SQL2016SP3.
-
-
Launch FixMissingMSI.exe.
-
The Scan dialog appears. In the top text box, specify a folder where you downloaded the setup files in step 2 (for example, d:\sqlsetup\RTM2017).
-
In the Scan Filter, you can keep the default "Product name contains: SQL".
-
Select Scan Now.
-
If any items are reported as Missing, the Status column has a value of Missing, and the row is highlighted in red.
-
You can fix individual missing files by selecting the Fix It button at the beginning of the row.

-
If you want to fix all missing MSIs or MSPs, select the Fix menu and then Fix All.
For more information, see SQL Setup ToolSuite Introduction (1) -FixMissingMSI.
One of the benefits of the FixMissingMSI tool is that you can use it to fix missing MSIs or MSPs for all products on Windows, not just SQL Server.