SQL Setup ToolSuite Introduction (1) –FixMissingMSI

If you have encountered missing cached MSI/MSP issues during SQL server setup, you may have knew below article:
How to restore the missing Windows Installer cache files and resolve problems that occur during a SQL Server update

In above link it provides a VB script to help you find out those missing MSI/MSP files in windows installer folder and it can even help you recover these files if you recreate the setup source. The VB script works great but if there are lots of missing MSI/MSP files then it could be boring to copy them back one bye one.

The motivation to create this tool, FixMissingMSI is from a case. I worked with a customer to recover missing MSI/MSP files for SQL patch installation. All cached MSI/MSP files are confirmed to be in the cached folder (c:\windows\Installer)  but SQL patch setup just complained error. After a few hours struggling checking the setup log carefully it is found out that the cached MSI/MSP files are the wrong version. My customer was applying 2008 patch but the cached files are from 2008R2. Obviously someone recovered these files with wrong setup source earlier we don't know when.

At that time I was thinking we need to a tool to do this kind of work for us and then I have the idea of FixMissingMSI. It should search installer products and find out those missing/mismatched MSI/MSP files from the cached folder, and fix them for me just with several mouse clicks. Now the tool is available in Github:


It works for all installer based product not limited to SQL server.

In above GitHub link there are actually three tools there, FixMissingMSI, ProductBrowser and SQLRegistryViewer. I will blog about the later two in other articles. Source code is also there you can download it to study how it works.  The binaries are in the release tab of GitHub you can go above link for latest version.  Below link is for version 2.2:



FixMissingMSI tool has below interface for your reference:

And its manual is here:


Comments (2)

  1. R_Clarke says:

    Thanks so much for this tool. Has rescued me from a never ending loop.
    Had a rebuilt server restored from a system state backup. Various different versions of SQL which wouldn’t repair or re-install or upgrade due to missing msp files. I used your tool to return the required files to the cache. Although I wasn’t able to repair any of the exisitng instances I was able to install a new version and create a new instance which served my needs! Brilliant!!

  2. I get an error running the fix program. I’d expect at least the fix program to not throw exceptions?

    $ ./FixMissingMSI.exe

    Unhandled Exception: Microsoft.Deployment.WindowsInstaller.InstallerException: More data is available.
    at Microsoft.Deployment.WindowsInstaller.ProductInstallation.d__3.MoveNext()
    at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
    at FixMissingMSI.myData.ScanProducts() in C:\Users\yqsu\Source\Repos\SQLSetupTools\FixMissingMSI\myData.cs:line 145
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()

Skip to main content