If you’ve ever had troubles with missing cached MSI/MSP files during SQL server setup, you might be familiar with the following article:
How to fix difficulties that occur during a SQL Server update by restoring the missing Windows Installer cache files.
The above link has a VB script that will assist you in locating lost MSI/MSP files in the Windows installer folder, as well as recovering these files if the setup source is restored. The VB script works fine, however if there are a lot of missing MSI/MSP files, copying them back one by one can be tedious.
FixMissingMSI Tool :
The FixMissingMSI software will be used in this approach to locate MSI and MSP files that are missing from the Windows Installer cache. You can also point the tool to the original media locations and have it recache the missing files as an extreme measure.
The FixMissingMSI software is available for Free download from the below link :
I extracted the file from the latest version 2.2.1 software that I downloaded from the URL above.
After you’ve extracted the downloaded software, navigate to the Manual folder to learn how to use this tool.
When I double-clicked FixMissingMSI.exe, a wizard appeared, asking if I wanted to set up the scan menu.
If you select “Product name contains” and enter “SQL,” the program will search for all products whose product names contain the key word and also you need to provide Media + SP + CU location path
If you specify this setup source folder, this program will search all of the *.MSI and *.MSP files inside to see if any missing or mismatched MSI/MSPs can be identified.
If you don’t specify this folder, the tool may be unable to locate the MSI/MSP for those missing/mismatched files, leaving you unable to repair them. Even if you don’t specify this path, this program may still be able to locate the missing MSI/MSP in the installed product’s LastUsedSource folder.
For example, for the SQL product, the best practice is to place the SQL server RTM setup media and all subsequent service packs, CUs in the same folder, for example:
Please remember to extract the package using the ‘X‘ switch to the folder if you download service packs or cumulative updates from the Microsoft site. For instance, the command below extracts SP1 to the SP1 subfolder:
Even though the package is in the same folder, it is useless if you do not extract it.
I’ve created a media path that includes RTM, SP, and CU. Clicked SCAN NOW button
If you have any missing files, the scanning results will show them like below :
You will see all files in the All option, which signifies the status of Missing, Mismatched, and OK.
Only those will be listed if you pick Missing or Mismatched only.
When I selected Fix It, a pop-up window appeared, instructing me to click OK to copy the missing file.
We can fix the missing msi files separately, as shown above, however fixing the number of multiple files individually is a time-consuming operation. So, we can accomplish it by going to the Fix TAB and clicking on the Fix All button.
As you can see, I have 60 missing files that need to be restored to the Installer folder on Drive C. When I clicked the Fix All option, a pop window appeared asking me to click OK to immediately fix all missing files. I pressed the OK button.
It repaired 30 missing files and attempted to install SQL 2014 SP3 and CU, which it did successfully.
There are still 30 files that need to be repaired. Here’s what I noticed from the tool, This FixmissingMSI tool has a column called ‘LastUsedSource,’ which is nothing but the location where we installed the most recent SP or CU. If the setup folder exists on the server, this tool will automatically gather information from that LastUsedSource, which is nothing more than the Last Installed Source location of the media, service pack, or cumulative update.
It will not do anything if the recently installed SP or CU folders do not exist on the server, and the column ‘Fixcommand’ will not be generated with any commands to repair it.
I‘m not sure if my assumption is correct.
As a report, we can also export the data from the missing files to a CSV and text file.
The SQL Media\Service Pack \ Security Update \ Cumulative Update We must manually extract any patch or ISO file to a specific directory or folder before running the installation by double-clicking the “SETUP.exe” file, which is Best Practice for Installation.
If we launch the package without first manually extracting it, the software will extract it to an unknown location and begin the setup process. When the server is REBOOTED, that UN-known location may no longer exist on the server, and the next time we run any New SP\CU\SU, it will check for previously extracted locations, but if that place is not present on the server, an error will be thrown, and the installation will fail.