Step by Step Instructions on how to put the Installer Cache back together for SQL following “Unable to install Windows Installer MSP file” errors 1612 1635 1642 1646

Technorati Tags: ,,,,,

Background:

To give a little background as to how the files arrive in C:\Windows\Installer you will see that the file names all appear to be random in nature, which they are! They are placed there when you install using Windows Installer and will be a copy of the MSP or MSI file that is being executed. For components like the SQL Engine, where you have potentially many instances, you will have many copies of the MSI and MSP files. From one machine to another the file names will be different.

Fixing the issue:

The copy of the MSI/MSP files are required when applying a later fix, if they are lost or missing the setup of the later fix will fail. The solution is to put the C:\Windows\Installer directory back together. It is a good idea to check why the file isn’t there, usually you won’t know, but it the reason is that the C:\Windows\Installer directory has been deleted you might want to give up now....

The following example was using log files from an SP3 failure, you’ll notice that not all components failed, in this case the failure was restricted to Tools and Database Engine.

Step 1:

Establish what went wrong, looking in the Summary will indicate which component failed for example (I’ve taken some entries out to make this a little easier to understand), you can see here that two components have failed, the database engine and also Client components

Time: 11/10/2009 06:01:42.225

KB Number: KB955706

Machine: WMSI002461

OS Version: Microsoft Windows Server 2003 family, Enterprise Edition Service Pack 2 (Build 3790)

Package Language: 1033 (ENU)

Package Platform: x86

Package SP Level: 3

Package Version: 4035

Command-line parameters specified:

/quiet

/allinstances

Cluster Installation: No

**********************************************************************************

Prerequisites Check & Status

SQLSupport: Passed

**********************************************************************************

Products Detected Language Level Patch Level Platform Edition

Setup Support Files ENU 9.3.4035 x86

Database Services (MSSQLSERVER) ENU SP2 2005.090.3077.00 x86 ENTERPRISE

SQL Server Native Client ENU x86

SQL Server Native Client ENU 9.00.4035.00 x86

Client Components ENU SP2 9.2.3077 x86 ENTERPRISE

MSXML 6.0 Parser ENU x86

SQLXML4 ENU x86

SQLXML4 ENU 9.00.4035.00 x86

Backward Compatibility ENU x86

Backward Compatibility ENU 8.05.2312 x86

Microsoft SQL Server VSS Writer ENU x86

Microsoft SQL Server VSS Writer ENU 9.00.4035.00 x86

**********************************************************************************

Products Disqualified & Reason

Product Reason

**********************************************************************************

Processes Locking Files

Process Name Feature Type User Name PID

msftesql Database Services Service NT AUTHORITY\SYSTEM 1368

**********************************************************************************

Product Installation Status

Product : Setup Support Files

Product Version (Previous): 4035

Product Version (Final) :

Status : Not Selected

Log File :

Error Number : 0

Error Description :

----------------------------------------------------------------------------------

Product : Database Services (MSSQLSERVER)

Product Version (Previous): 3077

Product Version (Final) :

Status : Failure

Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB955706_sqlrun_sql.msp.log

Error Number : 1635

Error Description : Unable to install Windows Installer MSP file

----------------------------------------------------------------------------------

Product : SQL Server Native Client

Product Version (Previous):

Product Version (Final) : 4035

Status : Success

Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Redist9_Hotfix_KB955706_sqlncli.msi.log

Error Number : 0

Error Description :

----------------------------------------------------------------------------------

Product : SQL Server Native Client

Product Version (Previous): 4035

Product Version (Final) :

Status : Not Selected

Log File :

Error Number : 0

Error Description :

----------------------------------------------------------------------------------

Product : Client Components

Product Version (Previous): 3077

Product Version (Final) :

Status : Failure

Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB955706_sqlrun_tools.msp.log

Error Number : 1635

Error Description : Unable to install Windows Installer MSP file

----------------------------------------------------------------------------------

Product : MSXML 6.0 Parser

Product Version (Previous):

Product Version (Final) : 6.10.1129.0

Status : Success

Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Redist9_Hotfix_KB955706_msxml6.msi.log

Error Number : 0

Error Description :

----------------------------------------------------------------------------------

Product : SQLXML4

Product Version (Previous):

Product Version (Final) : 4035

Status : Success

Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Redist9_Hotfix_KB955706_sqlxml4.msi.log

Error Number : 0

Error Description :

----------------------------------------------------------------------------------

**********************************************************************************

Summary

One or more products failed to install, see above for details

Exit Code Returned: 1635

Step 2:

We know which components have failed, and if you look at the Summary, also which log file to look into, its worth saying that I’ve seen this error reported at various times against all of the components, the principle behind the solution is the same. Now we’ll start with the Client Components and look into the file

C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB955706_sqlrun_tools.msp.log

We can see the following

MSI (s) (EC:88) [06:01:52:772]: APPCOMPAT: looking for appcompat database entry with ProductCode '{4D2DFB70-AECB-47BF-A895-3B3AA544934F}'.

MSI (s) (EC:88) [06:01:52:772]: APPCOMPAT: no matching ProductCode found in database.

MSI (s) (EC:88) [06:01:52:772]: MSCOREE not loaded loading copy from system32

MSI (s) (EC:88) [06:01:52:787]: Opening existing patch 'C:\WINDOWS\Installer\d044b686.msp'.

MSI (s) (EC:88) [06:01:52:787]: Note: 1: 2203 2: C:\WINDOWS\Installer\d044b686.msp 3: -2147287038

MSI (s) (EC:88) [06:01:52:787]: Opening existing patch 'C:\WINDOWS\Installer\d044b686.msp'.

MSI (s) (EC:88) [06:01:52:787]: Note: 1: 2203 2: C:\WINDOWS\Installer\d044b686.msp 3: -2147287038

MSI (s) (EC:88) [06:01:52:787]: Couldn't find local patch 'C:\WINDOWS\Installer\d044b686.msp'. Looking for it at its source.

MSI (s) (EC:88) [06:01:52:787]: Resolving Patch source.

MSI (s) (EC:88) [06:01:52:787]: User policy value 'SearchOrder' is 'nmu'

MSI (s) (EC:88) [06:01:52:787]: User policy value 'DisableMedia' is 0

MSI (s) (EC:88) [06:01:52:787]: Machine policy value 'AllowLockdownMedia' is 0

MSI (s) (EC:88) [06:01:52:787]: SOURCEMGMT: Media enabled only if package is safe.

MSI (s) (EC:88) [06:01:52:787]: SOURCEMGMT: Looking for sourcelist for product {88591C3A-E392-4B2C-98B7-F123862FD540}

MSI (s) (EC:88) [06:01:52:787]: SOURCEMGMT: Adding {88591C3A-E392-4B2C-98B7-F123862FD540}; to potential sourcelist list (pcode;disk;relpath).

MSI (s) (EC:88) [06:01:52:787]: SOURCEMGMT: Now checking product {88591C3A-E392-4B2C-98B7-F123862FD540}

MSI (s) (EC:88) [06:01:52:787]: SOURCEMGMT: Media is enabled for product.

MSI (s) (EC:88) [06:01:52:787]: SOURCEMGMT: Attempting to use LastUsedSource from source list.

MSI (s) (EC:88) [06:01:52:787]: SOURCEMGMT: Trying source d:\058c7b9c5aded2721b9b421ebce7\HotFixTools\Files\.

MSI (s) (EC:88) [06:01:52:803]: Note: 1: 2203 2: d:\058c7b9c5aded2721b9b421ebce7\HotFixTools\Files\sqlrun_tools.msp 3: -2147287037

MSI (s) (EC:88) [06:01:52:803]: SOURCEMGMT: Source is invalid due to missing/inaccessible package.

MSI (s) (EC:88) [06:01:52:803]: Note: 1: 1706 2: -2147483647 3: sqlrun_tools.msp

MSI (s) (EC:88) [06:01:52:803]: SOURCEMGMT: Processing net source list.

MSI (s) (EC:88) [06:01:52:803]: Note: 1: 1706 2: -2147483647 3: sqlrun_tools.msp

MSI (s) (EC:88) [06:01:52:803]: SOURCEMGMT: Processing media source list.

MSI (s) (EC:88) [06:01:53:834]: SOURCEMGMT: Resolved source to: 'sqlrun_tools.msp'

MSI (s) (EC:88) [06:01:53:881]: Note: 1: 1314 2: sqlrun_tools.msp

MSI (s) (EC:88) [06:01:53:881]: Unable to create a temp copy of patch 'sqlrun_tools.msp'.

MSI (s) (EC:88) [06:01:53:881]: Note: 1: 1708

MSI (s) (EC:88) [06:01:53:881]: Note: 1: 2729

MSI (s) (EC:88) [06:01:53:881]: Note: 1: 2729

MSI (s) (EC:88) [06:01:53:881]: Product: Microsoft SQL Server 2005 Tools -- Installation failed.

MSI (s) (EC:88) [06:01:53:912]: MainEngineThread is returning 1635

This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.

C:\WINDOWS\Installer\eb2d173.msi

MSI (c) (D8:24) [06:01:53:912]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1

MSI (c) (D8:24) [06:01:53:912]: MainEngineThread is returning 1635

=== Verbose logging stopped: 09-11-2009 06:01:53 ===

I’ve highlighted the significant line that shows us which file is missing

'C:\WINDOWS\Installer\d044b686.msp'

Step 3:

Searching the registry to confirm where the file that is lost came from so we search for d044b686.msp

We find it here

clip_image002

This doesn’t tell us much what we really need to know is which patch the missing MSP relates to so now we search for the Key Name

A3C19588293EC2B4897B1F3268F25D04

We find it first here

clip_image004

And also

clip_image006

So the missing file in this case is from the SP2 installation.

You will also see that there are a number of other keys below Patches, if you look at these they are for

GDR 3054

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\07BFD2D4BCEAFB748A59B3A35A4439F4\Patches\12695E170C2778943BDB5A3E4EF86872

GDR 3068

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\07BFD2D4BCEAFB748A59B3A35A4439F4\Patches\16A1D4CC9588CF24CA22720F01CC0674

GDR 3077

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\07BFD2D4BCEAFB748A59B3A35A4439F4\Patches\7FC9E76BBED538E49A1DD9D51F351CEF

SP1

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\07BFD2D4BCEAFB748A59B3A35A4439F4\Patches\AE08B0AA93391F14192734DE512DD3F3

GDR 2050

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\07BFD2D4BCEAFB748A59B3A35A4439F4\Patches\DCFCFE0773BB0D64DBAFB0B8DF2321A3

If you search for the Patch GUID (in the case of 3054 this is 12695E170C2778943BDB5A3E4EF86872

You will be taken to the file name that should exist in C:\Windows\Installer

clip_image008

Approaches to fixing the issue

Approach A:

We know that the MSP file for SP2 is missing, so we could simply do the following

1) Download SP2

2) Unpackage SP2 using the /X option, this extracts the contents of SP2 to a directory

3) Copy the file sqlrun_tools.msp to the C:\Windows\Installer directory under the name d044b686.msp

Approach B:

1) Download *all* the patches that are listed

2) Unpackage them all using the /X option

3) Copy all the sqlrun_tools.msp files to their respective names in C:\Windows\Installer

If we go for approach A there is a chance that one of the other files may be missing and prevent the setup from working, on the up-side its a bit quicker.

Approach B is going to take longer, in that you will have to find all the file names and also download all of the fixes.

I went through the whole process for this server and I made a list of the failed components and the patches required with their names

Tools: sqlrun_tools in directory ...\hotfixtools\files

SP1 1cc85cf8

2050 d044b424

SP2 d044b686

3054 506f360

3068 63634544

3077 515eef2

Database: sqlrun_sql in directory ...\hotfixsql\files

SP1 1cc85bb2

2050 d044b40c

SP2 d044b532

3054 506f353

3068 63634537

3077 515eee5

So now its just a case of coping these files into the C:\windows\installer directory and re-running the service pack or hotfix.

Now the above addresses situations where the msp files are missing, however it is also possible to see situations where there is a missing MSI file, in this situation the file missing is the original install package rather than a hotfix/service pack, but the same principal applies it is simply a case of locating the original install MSI and coping it into the C:\Windows\Installer directory, however the file name is now found in a different place in the registry for example

clip_image010