How to Resolve missing MSI or MSP packages during SQL Server Service Packs, Hotfix or Cumulative Updates

Article translations Article translations
Close Close
Article ID: 2015100 - View products that this article applies to.
Expand all | Collapse all


This article has been superceded by:

969052 How to restore the missing Windows Installer cache files and resolve problems that occur during a SQL Server update;EN-US;969052

Please use KB aritcle 969052 for the current process.

  When installing a SQL Server service pack, hotfix or cumulative update the setup program encounters one or more of the following conditions:

  • Unable to locate or open a specific MSP file
  • Unable to locate  or open a specific MSI file
  • MSP file found but not usable, may be corrupted or version conflicts
  • Original RTM Source media or current service pack source media not accessible.
  • Invalid LastUsedSource entry

This results in the setup program failing to complete the current installation.

The errors will show up as text messages in the Setup Logs located at Program Files\Microsoft SQL Server\100\Setup Bootstrap or event IDs such as:

  • 1603 Fatal error during installation.
  • 1612 The installation source for this product is not available. Verify that the source exists and that you can access it.
  • 1620 This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
  • 1635 Unable to install Windows Installer MSP file or
    This update package could not be opened. Verify that the update package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer update package.
  • 1636 Unable to install Windows Installer MSP file or
    This update package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer update package.
  • 1642 The upgrade cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade.
  • 1706. The endpoint format is invalid.
  • 1714 MSP Error: 1714 The older version of Microsoft SQL Server Native Client cannot be removed. Contact your technical support group
    File not found messages in the detailed log files
  • SOURCEMGMT: Source is invalid due to missing/inaccessible package.
  • Error code 0x84B20001.
  • Warning:  Local cached package 'C:\Windows\Installer\763d9.msi' is missing (the actual file name can vary).

Please note that there errors can happen for reasons other than those listed in this document.


During SQL Setup the installation packages, whether msp or .msi files, are cached in the Windows Installer Cache. When repairing the product or when installing service packs, hotfixes or cumulative updates, should these cached files be found to be missing, an error will be logged as mentioned in the symptoms section.


Using the code listed under the More Information section create the FindSQL vbs script. This script will gather the information for correcting invalid package paths and will be used against the source locations to ensure all MSP packages are present in the Windows installer cache directory. Any missing packages will be re-added provided original source media is available.

Steps to Determine Downloads Required and the Repair Process

Discovery Process.

  1. Locate the directory you saved the script content to.
  2. Open command prompt to the directory you saved the script to and run the following command:
    Cscript FindSQL.vbs %computername%_sql_install_details.txt
  3. You will now detect any invalid source paths, missing msi or msp source to the directory shown in your %computername%_sql_install_details.txt by searching the file for “DOES NOT“ or !!! to determine package path and name, missing file and manual update statement should it be required to over-write an existing Windows Installer cache file. ================================================================================

PRODUCT NAME   : Microsoft SQL Server 2008 Database Engine Services


  Product Code: {9FFAE13C-6160-4DD0-A67A-DAC5994F81BD}

  Version     : 10.2.4000.0

  Most Current Install Date: 20110211

  Target Install Location:

  Registry Path:


     Package    : sql_engine_core_inst.msi

  Install Source: \x64\setup\sql_engine_core_inst_msi\

  LastUsedSource: m;1;G:\x64\setup\sql_engine_core_inst_msi\ <-- This shows us by the "m;" that the original source was a CD\DVD drive with drive letter of G. Should this have been installed from a file folder or network share the LastUsedSource would have begun with "n;" followed by a <Numeric Data Name;> and then the actual path.


 !!!! sql_engine_core_inst.msi DOES NOT exist on the path in the path G:\x64\setup\sql_engine_core_inst_msi\ !!!!


 Action needed, re-establish the path to G:\x64\setup\sql_engine_core_inst_msi\ <-- This line shows you the full path that must exist in order to update missing files for the original installation media.


Installer Cache File: C:\WINDOWS\Installer\19b4d2.msi <-- This confirms the name of the installer cache file.



!!!! C:\WINDOWS\Installer\19b4d2.msi DOES NOT exist in the Installer cache. !!!!



 NOTE: This section of the output advises you of actions required to resolve the missing files:


     Action needed, recreate or re-establish path to the directory:

       G:\x64\setup\sql_engine_core_inst_msi\then rerun this script to update installer cache and results

     The path on the line above must exist at the root location to resolve

     this problem with your msi/msp file not being found or corrupted,

     In some cases you may need to manually copy the missing file or manually

     replace the problem file overwriting it is exist:


     Copy "G:\x64\setup\sql_engine_core_inst_msi\sql_engine_core_inst.msi" C:\WINDOWS\Installer\19b4d2.msi


     Replace the existing file if prompted to do so.


  2. You will now detect any invalid source paths, missing msi or msp source to the directory shown in your %computername%_sql_install_details.txt by searching the file for “Package does not exist “to determine package name, missing file and source directory as shown below.

For example of the SQL Server Database Engine

ProductName: Microsoft SQL Server 2008 Database Engine Services

Product Code: {79F1B65E-8FC0-4D03-954D-F9E71C85AEC7}

Base Version: 10.0.1600.22 ß this shows us current build

Registry Path: Installer\Products\ E56B1F970CF830D459D49F7EC158EA7C\SourceList

Package: SqlRun_SQL.msi

Last Used Source: n;1;F:\sql 2008\Enterprise\x64\setup\sql_engine_core_inst_msi\ß this shows us that they had the source media in a folder called   F:\sql 2008\Enterprise\x64\setup\sql_engine_core_inst_msi\when they originally installed SQL Server

   Package does not exist on the Last Used Source path.


Examples of possible Patches installed output:

Example 1

Patch Key: A4FE53A4868D51B48AD4E39852AA5985

        DisplayName = Service Pack 1 for SQL Server Database Services 2008

        Last Used Source = n;1;c:\0ca91e857a4f12dd390f0821a3\HotFixSQL\Files\ ß this shows us that they double-clicked on the SP1 exe to install which created the temp directory of  c:\0ca91e857a4f12dd390f0821a3 which means you will need to run the SP1 exe with /x and extract it to that same  c:\0ca91e857a4f12dd390f0821a3 location or new location and hack registry to match, preference is to extract to match the current registry path of  c:\0ca91e857a4f12dd390f0821a3 in this case.

        Package Name = sqlrun_sql.msp

        Install Date = 20100415

        Installer Cache File Path = c:\WINDOWS\Installer\ca15a0d.msp

        Package does not exist…

Example 2

Patch Key: 86ED76CC0781E1840945508655B699A2

        DisplayName = Service Pack 1 for SQL Server Database Services 2008

        Last Used Source =

        Package Name =

        Install Date = 20100421

        Installer Cache File Path =

In example 2 for unknown reasons it could be entirely blank and you would need to extract the SQL Server SP1 in this case and fill in all the blanks manually

Starting the repair process

1.       You will need to download any missing SP or Hotfixes and repeat this process till all missing paths are recreated, once all are present then repeat the:

Cscript FindSQL.vbs %computername%_sql_install_details.txt


2.       The %computername%_sql_install_details.txt output should not contain any invalid paths; however it may or may not missing msp packages. If it does so all source paths as existing but missing packages then run the RepairSource_V3.js as shown

Cscript Repairsource_v3.js <Path to extracted source media>


3.       Repeat use of the Repairsource_v3.js for each unique source path location as needed where missing package was noted, once completed run the:

Cscript FindSQL.vbs %computername%_sql_install_details.txt


4.       Verify the results again, once all paths and packages reported as found try your installation again.

More Information


FindSQLInstalls.VBS Script Content

On Error Resume Next

Dim arrSubKeys, arrSubKeys2
Dim objFSO, objShell, objFile, objReg, objConn
Dim strComputer, strKeyPath, strNewSource
Dim strWorkstationName, strDBPath, strSubKey, strSubKey2(), strKeyPath02,  strRetValue00
Dim strRetValue01, strRetValue02, strRetValNew02, strRetValNew03, strRetValNew04, strRetValNew05, strRetValNew06, strRetValNew07, strRetValNew08, strRetValNew09, strRetValue10, strRetValNew10, strRetValNew11, strRetValNew12

Const HKCR = &H80000000 'HKEY_CLASSES_ROOT
Const ForReading = 1, ForWriting = 2, ForAppEnding = 8

' Leaving strNewSource will result in no search path updating.
' Currently DO NOT EDIT these.
strNewSource = ""
strNewRTMSource = ""

' Define string values
strComputer = "."
strSQLName = "Microsoft SQL"
strSQLName2k8 = "SQL Server"
strDotNetName = "Microsoft .NET"
strVStudioName = "Microsoft Visual Studio"
strKeyPath = "Installer\Products"
strKeyPath2 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products"
strNValue00 = "ProductName"
strNValue01 = "PackageName"
strNValue02 = "LastUsedSource"
strNValue03 = "InstallSource"
strNValue04 = "LocalPackage"
strNValue05 = "DisplayVersion"
strNValue06 = "InstallDate"
strNValue07 = "UninstallString"
strNValue08 = "PackageCode"
strNValue09 = "MediaPackage"
strNValue10 = "InstallSource"
strNValue11 = "AllPatches"
strNValue12 = "NoRepair"

If WScript.arguments.count <> 1 Then
   WScript.echo "Usage: cscript " & WScript.scriptname & " outputfilename.txt"
End If

'--Setup the output file
Set fso = CreateObject("Scripting.FileSystemObject")
Set txtFile = fso.OpenTextFile(WScript.arguments(0), ForWriting, True)
If err.number <> 0 Then
    WScript.echo "Error 0x" & myHex(err.number,8) & ": " & err.source & " - " & err.description
End If

txtFile.writeline "Products installed on the local system"
txtFile.writeline " "
txtFile.writeline " "

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = WScript.CreateObject("WScript.Shell")

'--Set up the registry provider.
Set objReg = GetObject("winmgmts:\\" & strComputer & _

Set wiInstaller = CreateObject("WindowsInstaller.Installer")

'--Enumerate the "installer\products" key on HKCR
objReg.EnumKey HKCR, strKeyPath, arrSubKeys

For Each strSubKey In arrSubKeys

strKeyPath02 = "Installer\Products\" & strSubKey & "\SourceList"
strKeyPath03 = "Installer\Products\" & strSubKey & "\SourceList\Media"

strProduct01 = "Installer\Products\" & strSubKey

strInstallSource = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\" & strSubKey & "\InstallProperties\"
strInstallSource2 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\" & strSubKey & "\patches\"
strInstallSource3 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches"
strInstallSource4 = "Installer\Patches\"
strInstallSource5 = "SOFTWARE\Classes\Installer\Patches\"

objReg.GetStringValue HKCR, strProduct01, strNValue00, strRetValue00
objReg.GetStringValue HKCR, strKeyPath02, strNValue01, strRetValue01
objReg.GetStringValue HKCR, strKeyPath02, strNValue02, strRetValue02
strRetValNew02 = Mid(strRetValue02, 5)
objReg.GetStringValue HKCR, strKeyPath03, strNValue09, strRetValue09
strRetValue10 = strNewRTMSource & strRetValue09
objReg.GetStringValue HKLM, strInstallSource, strNValue03, strRetValNew03
objReg.GetStringValue HKLM, strInstallSource, strNValue04, strRetValNew04
objReg.GetStringValue HKLM, strInstallSource, strNValue05, strRetValNew05
objReg.GetStringValue HKLM, strInstallSource, strNValue06, strRetValNew06
objReg.GetStringValue HKLM, strInstallSource, strNValue07, strRetValNew07
objReg.GetStringValue HKLM, strInstallSource, strNValue10, strRetValNew10
objReg.GetStringValue HKLM, strInstallSource, strNValue12, strRetValNew12
objReg.GetStringValue HKLM, strInstallSource2, strNValue11, strRetValNew11

' Pull the Product Code from the Uninstall String
strProdCode = strRetValNew07
  ProdCodeLen = Len(strProdCode)
  ProdCodeLen = ProdCodeLen - 14
strRetValNew08 = Right(strProdCode, ProdCodeLen)

If instr(1, strRetValue00, strSQLName, 1) or instr(1, strRetValue00, strSQLName2k8, 1) Then
    txtFile.writeline "ProductName: " & strRetValue00
    txtFile.writeline "Product Code: " & strRetValNew08
    txtFile.writeline "Version: " & strRetValNew05
    txtFile.writeline "Registry Path: "
    txtFile.writeline "   HKEY_CLASSES_ROOT\" & strKeyPath02
    txtFile.writeline "Package: " & strRetValue01
    txtFile.writeline "Install Source: " & strRetValue10
    txtFile.writeline "Last Used Source: " & strRetValue02
    'txtFile.writeline "Does this file on this path exist? " & strRetValNew02 & "\" & strRetValue01
    If fso.fileexists(strRetValNew02 & "\" & strRetValue01) Then
        txtFile.writeline "   Package exists on the Last Used Source path."
        txtFile.writeline "   Package does not exist on the Last Used Source path."
        ' Fix the LastUsedSource by adding source and Forcing search of list
        If strNewSource <> "" Then
        txtFile.writeline "      New Install Source Path Added: " & strNewSource
        wiInstaller.AddSource strRetValNew08, "", strNewSource
        If strNewRTMSource <> "" Then
        wiInstaller.AddSource strRetValNew08, "", strNewRTMSource
        txtFile.writeline "      Forcing SourceList Resolution For: " & strRetValNew08
        wiInstaller.ForceSourceListResolution strRetValNew08, ""
        End If
        End If
    End If
    txtFile.writeline "Installer Cache File: " & strRetValNew04
    If fso.fileexists(strRetValNew04) Then
       txtFile.writeline "   Package exists in the Installer cache."
       txtFile.writeline "   Package does not exist in the Installer cache."
    End If
    txtFile.writeline "Install Date: " & strRetValNew06
    txtFile.writeline " "
    txtFile.writeline  "Patches Installed "
    txtFile.writeline  " "
    txtFile.writeline "AllPatches: " & strRetValNew11
    txtFile.writeline  " "

    objReg.EnumKey HKLM, strInstallSource2, arrSubKeys2
    uUpperBounds = UBound(arrSubKeys2,1)
     If err.number = 0  Then
        For Each strSubKey2 in arrSubKeys2
    '    WScript.echo "value = " & strSubKey2
         txtfile.writeline "   Patch Key under: "
         txtFile.writeline "   HKEY_CLASSES_ROOT\Installer\Patches\" & strSubKey2
             objReg.GetStringValue HKLM, strInstallSource2 & "\" & strSubKey2 & "\", "DisplayName", strResultDisplayName
             txtFile.writeline "        DisplayName = " & strResultDisplayName
             txtFile.writeline " The both Last Used Source should have same values:"
             objReg.GetStringValue HKCR, strInstallSource4 & strSubKey2 & "\SourceList\", "LastUsedSource", strResultLastUsed
             txtFile.writeline "        Last Used Source = " & strResultLastUsed
             objReg.GetStringValue HKLM, strInstallSource5 & strSubKey2 & "\SourceList\", "LastUsedSource", strResultLastUsed
             txtFile.writeline "        Last Used Source = " & strResultLastUsed
             objReg.GetStringValue HKLM, strInstallSource2 & "\" & strSubKey2 & "\", "Installed", strResultInstalled
             txtFile.writeline "        Install Date = " & strResultInstalled
             'txtfile.writeline strInstallSource3 & "\" & strSubKey2 & "\" & "LocalPackage"
             objReg.GetStringValue HKLM, strInstallSource3 & "\" & strSubKey2 & "\", "LocalPackage", strResultLocalPackage
             txtFile.writeline "        Installer Cache File Path = " & strResultLocalPackage
            ' WScript.echo "Installer = " & strResultLocalPackage
                If strResultLocalPackage <> "" Then
               If fso.fileexists(strResultLocalPackage) Then
                 txtFile.writeline "        Package exists in the Installer cache."
                 txtFile.writeline " "

                        txtFile.writeline "        Package does not exist in the Installer cache."
                        txtFile.writeline " "
                  End If
                    txtFile.writeline " "
                End If
            txtfile.writeline " "
            txtfile.Writeline "      No Patches Found"
    End If
    txtFile.writeline " "
    txtFile.writeline  "==============================================================="
    txtFile.writeline  "*** WARNING **** This command line is not meant to be used under normal conditions."
    txtFile.writeline  " "
    txtFile.writeline  "Un-install string if exists = " & strRetValNew07
    txtFile.writeline  " "
    txtFile.writeline  "==============================================================="
    txtFile.writeline  " "
     End If

Set txtFile = Nothing
Set fso = Nothing



RepairSource_v3.js Script Content

if( WScript.Arguments.Length < 1 )
    WScript.Echo( "Usage: RepairSP1Source.js \"<path to extracted SP1 files>\"" );
    WScript.Quit( 1 );

var filesystem = new ActiveXObject( "Scripting.FileSystemObject" );
var newSource = WScript.Arguments( 0 );

if( !filesystem.FolderExists( newSource ) )
    WScript.Echo( "The path to the extracted SP1 package does not exist.  Please correct the path and run the tool again." );
    WScript.Quit( 1 );

var installer = WScript.CreateObject( "WindowsInstaller.Installer" );

// Look for MSPs at the extracted location

EnumerateMSPs( newSource );

function EnumerateMSPs( extractedSp1PatchPath )
    var folder = filesystem.GetFolder( extractedSp1PatchPath );
    var fileEnum = new Enumerator( folder.Files );
    for( ; !fileEnum.atEnd(); fileEnum.moveNext() )
        var nextFile = fileEnum.item();

        if( filesystem.GetExtensionName( nextFile.Name ) == "msp" )
            WScript.Echo( "Found patch located at: " + nextFile.Path );
            var extractedSp1PatchSummaryInfo = installer.SummaryInformation( nextFile.Path );
            // Retrieve the PatchCode from the SummaryInformation
            var extractedSp1PatchCode = new String( extractedSp1PatchSummaryInfo.Property( 9 ) ).substring( 0, 38 );
            // Look to see if we need to repair the cached MSP for this Patch
            RepairCachedMSP( extractedSp1PatchCode, nextFile.Path );

    // Now look in subfolders for MSPs
    var folderEnum = new Enumerator( folder.SubFolders );
    for( ; !folderEnum.atEnd(); folderEnum.moveNext() )
        var nextFolder = folderEnum.item();
        EnumerateMSPs( nextFolder.Path );

function RepairCachedMSP( extractedSp1PatchCode, extractedSp1PatchPath )
    var sp1Patch = null;
    var cachedSp1PatchFileName = null;
    WScript.Echo( "Attempting to repair the local cache for PatchCode \"" + extractedSp1PatchCode + "\"" );
    // Enumerate all products installed on the machine to see if any have been patched by
    // this MSP
    var products = installer.ProductsEx( "", "", 4 );

    // Look for the first product that is patched with this MSP.

    for( var x = 0; (sp1Patch == null) && (x < products.Count); x++ )
        var nextProduct = products.Item( x );
        var nextProductPatches = installer.PatchesEx( nextProduct.ProductCode, "", 4, 1 );

        for( var y = 0; (sp1Patch == null) && (y < nextProductPatches.Count); y++ )
            var nextProductPatch = nextProductPatches.Item( y );
            var nextPatchURL = nextProductPatch.PatchProperty( "MoreInfoURL" );
            var nextPatchURLString = new String( nextPatchURL );

            // See if this patch is SP1 and if it matches the PatchCode of what the user
            // extracted to the hard drive.
            if ( extractedSp1PatchCode == nextProductPatch.PatchCode )
                cachedSp1PatchFileName = nextProductPatch.PatchProperty( "LocalPackage" );
                // Only re-cache if the MSP is missing
                if( !filesystem.FileExists( cachedSp1PatchFileName ) )
                    sp1Patch = nextProductPatch;

    if( !cachedSp1PatchFileName )
        WScript.Echo( "No action can be taken as the patch has not been applied on the local machine." );
        if( sp1Patch == null )
            WScript.Echo( "No action will be taken since the provided SP1 patch appears to exist locally." );
            var extractedSp1Patch = filesystem.GetFile( extractedSp1PatchPath );
            WScript.Echo( "Re-caching patch for the product code \"" + sp1Patch.ProductCode
                + "\" and patch \"" + sp1Patch.PatchCode + "\" to \"" + cachedSp1PatchFileName + "\"" );
            extractedSp1Patch.Copy( cachedSp1PatchFileName );
            var updatedSp1Patch = filesystem.GetFile( cachedSp1PatchFileName );
            var currentAttributes = updatedSp1Patch.Attributes;
            // If the file isn't read-only mark it as such.

           if( ( currentAttributes & 1 ) == 0 )
                updatedSp1Patch.Attributes = (currentAttributes | 1 );



MSP & MSI File information

An application that has been installed using the Microsoft Windows Installer can be upgraded by reinstalling an updated installation package (.msi file), or by applying a Windows Installer patch (an .msp file) to the application.

A Windows Installer patch (.msp file) is a file used to deliver updates to Windows Installer applications. The patch is a self-contained package that contains all the information required to update the application.

A patch package contains the actual updates to the application and describes which versions of the application can receive the patch. Patches contain at minimum two database transforms. One transform updates the information in the installation database of the application. The other transform adds information that the installer uses for patching files. The installer uses the information provided by the transforms to apply patch files that are stored in the cabinet file stream of the patch package. A patch package does not have a database like an installation package (.msi file.)


For more information about the products or tools that automatically check for this condition on your instance of SQL Server and on the versions of the SQL Server product, see the following table:


Rule software

Rule title

Rule description

Product versions against which the rule is evaluated 

SQL Server 2008 R2 Best Practice Analyzer (SQL Server 2008 R2 BPA)

Setup - Installer cache is missing for the SQL Installation

The SQL Server 2008 R2 Best Practice Analyzer (SQL Server 2008 R2 BPA) provides a rule to detect Missing Installer cache file for SQL Server components. The SQL Server 2008 R2 BPA supports both SQL Server 2008 and SQL Server 2008 R2. If you run the BPA tool and encounter an Error with the title of Setup - Installer cache is missing for the SQL Installation, and then the cache files are missing from the cache folder.

SQL Server 2008
SQL Server 2008 R2

SQL Server 2012 Best Practice Analyzer (SQL Server 2012 BPA)

Setup - Installer cache is missing for the SQL Installation

The SQL Server 2012 Best Practice Analyzer (SQL Server 2012 BPA) provides a rule to detect Missing Installer cache file for SQL Server components.If you run the BPA tool and encounter an Error with the title of Setup - Installer cache is missing for the SQL Installation,and then the cache files are missing from the cache folder.

SQL Server 2012 

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.


Article ID: 2015100 - Last Review: April 3, 2012 - Revision: 5.0
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 Express with Advanced Services
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Web
  • Microsoft SQL Server 2008 Workgroup

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from