Part – 1 : SQL Server 2005 Patch Fails to install with an error "Unable to install Windows Installer MSP file"


We have seen several issues where installation of Service Pack/Hotfix/GDR/CU fails to install on one or more components of SQL Server 2005. In this blog , I have tried to include few troubleshooting tips and tricks for these kinds of installation failures.


 


Whenever a hotfix installation fails, we start troubleshooting  with the log file usually located at  %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Summary.txt


 


I am demonstrating an example to troubleshoot an issue where KB954606 (Security Update MS08-052) failed to install .


 


First , go to %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\ and see Summary.txt :


 


———————————————————————————-


Product Installation Status


Product                   : SQL Server Database Services 2005 (MSSQLSERVER)


Product Version (Previous): 3073


Product Version (Final)   :


Status                    : Failure


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


Error Number              : 1635


Error Description         : Unable to install Windows Installer MSP file


———————————————————————————-


 


Above error is for SQL Server Database Services 2005 , so in this example I will display troubleshooting steps for Database Engine only.


 


To troubleshoot this issue, I like to analyze verbose log which is usually located at %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KBnnnnnn_sqlrun_sql.msp.log .


[Where KBnnnnnn is a placeholder for the hotfix number which is failing to install. In our example, it is SQL9_Hotfix_KB954606_sqlrun_sql.msp.log .]


 


 


Partial Contents of SQL9_Hotfix_KB954606_sqlrun_sql.msp.log :


 


=== Verbose logging started: 1/18/2009  05:21:19  Build type: SHIP UNICODE 3.01.4000.4042  Calling process: c:\cf7b299b237d95aef330b0000d8d947f\hotfix.exe ===


MSI (c) (AC:D0) [17:45:28:483]: Resetting cached policy values


MSI (c) (AC:D0) [17:45:28:483]: Machine policy value ‘Debug’ is 0


MSI (c) (AC:D0) [17:45:28:483]: ******* RunEngine:


           ******* Product: {2373A92B-1C1C-4E71-B494-5CA97F96AA19}


           ******* Action:


           ******* CommandLine: **********


MSI (c) (AC:D0) [17:45:28:483]: Client-side and UI is none or basic: Running entire install on the server.


MSI (c) (AC:D0) [17:45:28:483]: Grabbed execution mutex.


MSI (c) (AC:D0) [17:45:28:515]: Cloaking enabled.


MSI (c) (AC:D0) [17:45:28:515]: Attempting to enable all disabled priveleges before calling Install on Server


MSI (c) (AC:D0) [17:45:28:530]: Incrementing counter to disable shutdown. Counter after increment: 0


MSI (s) (D0:F8) [17:45:28:546]: Grabbed execution mutex.


MSI (s) (D0:F4) [17:45:28:546]: Resetting cached policy values


MSI (s) (D0:F4) [17:45:28:546]: Machine policy value ‘Debug’ is 0


MSI (s) (D0:F4) [17:45:28:546]: ******* RunEngine:


           ******* Product: {2373A92B-1C1C-4E71-B494-5CA97F96AA19}


           ******* Action:


           ******* CommandLine: **********


MSI (s) (D0:F4) [17:45:28:546]: Machine policy value ‘DisableUserInstalls’ is 0


MSI (s) (D0:F4) [17:45:28:546]: Adding MSIINSTANCEGUID to command line.


MSI (s) (D0:F4) [17:45:28:546]: Warning: Local cached package ‘C:\WINDOWS\Installer\638de4.msi’ is missing.


MSI (s) (D0:F4) [17:45:28:546]: User policy value ‘SearchOrder’ is ‘nmu’


MSI (s) (D0:F4) [17:45:28:546]: User policy value ‘DisableMedia’ is 0


MSI (s) (D0:F4) [17:45:28:546]: Machine policy value ‘AllowLockdownMedia’ is 0


MSI (s) (D0:F4) [17:45:28:546]: SOURCEMGMT: Media enabled only if package is safe.


MSI (s) (D0:F4) [17:45:28:546]: SOURCEMGMT: Looking for sourcelist for product {2373A92B-1C1C-4E71-B494-5CA97F96AA19}


 


:


:


:


:


:


 


MSI (s) (D0:F4) [17:45:47:452]: Opening existing patch ‘C:\WINDOWS\Installer\9be677.msp’.


MSI (s) (D0:F4) [17:45:47:452]: Note: 1: 2203 2: C:\WINDOWS\Installer\9be677.msp 3: -2147287038


MSI (s) (D0:F4) [17:45:47:452]: Couldn’t find local patch ‘C:\WINDOWS\Installer\9be677.msp’. Looking for it at its source.


MSI (s) (D0:F4) [17:45:47:452]: Resolving Patch source.


MSI (s) (D0:F4) [17:45:47:452]: User policy value ‘SearchOrder’ is ‘nmu’


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Media enabled only if package is safe.


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Looking for sourcelist for product {4A35EF4A-D868-4B15-A84D-3E8925AA9558}


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Adding {4A35EF4A-D868-4B15-A84D-3E8925AA9558}; to potential sourcelist list (pcode;disk;relpath).


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Now checking product {4A35EF4A-D868-4B15-A84D-3E8925AA9558}


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Media is enabled for product.


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Attempting to use LastUsedSource from source list.


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Trying source d:\05ba72b40ba6b4d61d14cd3c3283\HotFixSQL\Files\.


MSI (s) (D0:F4) [17:45:47:452]: Note: 1: 2203 2: d:\05ba72b40ba6b4d61d14cd3c3283\HotFixSQL\Files\sqlrun_sql.msp 3: -2147287037


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Source is invalid due to missing/inaccessible package.


MSI (s) (D0:F4) [17:45:47:452]: Note: 1: 1706 2: -2147483647 3: sqlrun_sql.msp


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Processing net source list.


MSI (s) (D0:F4) [17:45:47:452]: Note: 1: 1706 2: -2147483647 3: sqlrun_sql.msp


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Processing media source list.


MSI (s) (D0:F4) [17:45:47:452]: Note: 1: 2303 2: 87 3: E:\


MSI (s) (D0:F4) [17:45:47:452]: Note: 1: 2303 2: 87 3: E:\


MSI (s) (D0:F4) [17:45:47:452]: SOURCEMGMT: Resolved source to: ‘sqlrun_sql.msp’


MSI (s) (D0:F4) [17:46:19:702]: Note: 1: 1314 2: sqlrun_sql.msp


MSI (s) (D0:F4) [17:46:19:702]: Unable to create a temp copy of patch ‘sqlrun_sql.msp’.


MSI (s) (D0:F4) [17:46:19:702]: Note: 1: 1708


MSI (s) (D0:F4) [17:46:19:702]: Note: 1: 2729


MSI (s) (D0:F4) [17:46:19:702]: Note: 1: 2729


MSI (s) (D0:F4) [17:46:19:702]: Product: Microsoft SQL Server 2005 — Installation failed.


 


MSI (s) (D0:F4) [17:46:19:718]: 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:\SQLSETUP\Servers\Setup\SqlRun_SQL.msi


MSI (c) (AC:D0) [17:46:19:827]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1


MSI (c) (AC:D0) [17:46:19:827]: MainEngineThread is returning 1635


=== Verbose logging stopped: 1/20/2009  17:46:19 ===


 


 


 


1.       The very first error I see in the above log is Local cached package ‘C:\WINDOWS\Installer\638de4.msi’ is missing. This file 638de4.msi is the cached msi file for sqlrun_sql.msi i.e. the main installation (RTM) of an instance of SQL Server Database Engine. During installation of RTM product, ..\Servers\Setup\SqlRun_SQL.msi is cached to %windir%\Installer folder for future use such as un-installation etc. Cached file has a different name which is a randomized alphanumeric name generated by the installer , this is because if you have multiple instances then multiple ‘Sqlrun_sql.msi’ has to be cached and hence a name conflict may occur. Anyways, if you know the GUID (ProductCode) of the instance , you can find the name of this cached file , go to


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\<GUID>\InstallProperties


In the right pane , look for the value of “LocalPackage” .


 


2.       Now that we knew ‘C:\WINDOWS\Installer\638de4.msi’ is missing , we need to put it back to C:\Windows\Installer. To do so , locate your main installation setup of SQL Server (viz. CD media or setup folder copied on local disk) , copy Servers\Setup\SqlRun_SQL.msi and paste it into C:\Windows\Installer , rename it to the cached filename , in our case we have to rename it to 638de4.msi. Double check that C:\WINDOWS\Installer\638de4.msi is available now.


3.       Let’s look for the next error in the log file and that is Couldn’t find local patch ‘C:\WINDOWS\Installer\9be677.msp’. Looking for it at its source .The filename 9be677.msp employs it is a MSP file means a patch , not a main product. I want to make it clear here that If we apply any patch , installer looks for the cached files of previously applied patche(s) as well as the cached msi file. So this cached msp file is also missing and we need to put it back. But the challenge is how to find which patch is this ? It is explained in following steps.


4.       In the following lines in log file, we see : Looking for sourcelist for product {4A35EF4A-D868-4B15-A84D-3E8925AA9558} means the PatchCode for missing msp file 9be677.msp is {4A35EF4A-D868-4B15-A84D-3E8925AA9558}. Also, from ******* Product: {2373A92B-1C1C-4E71-B494-5CA97F96AA19} , we know the ProductCode i.e. GUID is {2373A92B-1C1C-4E71-B494-5CA97F96AA19} .


So we have below info till this point :


GUID          = {2373A92B-1C1C-4E71-B494-5CA97F96AA19}


PatchCode     = {4A35EF4A-D868-4B15-A84D-3E8925AA9558}


 


The GUID and PatchCode are stored in registry in encrypted format. Search* (See Search Hints below) them ,open regedit , go to


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\<GUID>\Patches\<PatchCode>


In the right pane , see the value of “DisplayName” . In our case , it was like below :


DisplayName = Service Pack 2 for SQL Server Database Services 2005 ENU (KB921896)


 


So DisplayName explains that {4A35EF4A-D868-4B15-A84D-3E8925AA9558} is Patch Code for KB921896 i.e. SP2 .


 


5.       Recall Step 3 , we found the missing msp file i.e. 9be677.msp is for KB921896 . In order to put his cached msp file back , download KB921896 , extract it at a command prompt using switch /extract , go to extracted directory of KB921896 and copy ..\ hotfixsql\files\sqlrun_sql.msp , paste it in C:\Windows\Installer and rename it to 9be677.msp . Double check that ‘C:\WINDOWS\Installer\9be677.msp’ exists now.


 


6.       Now that we have made available both the missing files (msi and msp) , apply the patch (in our case KB954606) again which failed to install .It should succeed now. However , in case if it fails again, that may be due to the fact that it might be looking for some other patch which might have been applied previously and is missing now. If so, failure installation will again generate verbose log , open the verbose log (like SQL9_Hotfix_KB954606_sqlrun_sql.msp.log) , look at 15-20 lines above the bottom of the log file , you may find Couldn’t find local patch , put the appropriate cached msp file back to C:\Windpws\Installer , rename it appropriately and re-try the setup.


[It’s expected that log file after performing above steps won’t complain for ‘*.msi file is missing’ anymore .]


 


7.    For other failing components like AS, RS, NS, Tools, IS  etc please follow the troubleshooting method as explained in step1 to step6 looking at the appropriate verbose log file. Please note that GUID, msp filename and msp file path in the extracted folder would be different for different components. Choose carefully.


 


Hope this helps !


                                                                                                                                               


 


*Search Hints  :


1.          As ‘Note’ of KB article 938321 explains , to locate the specific Product Code registry subkey, search for the ProductName registry entry that has the value of “Microsoft SQL Server 2005 (InstanceName)”


                under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\ registry subkey.


2.          Alternatively, see this link , very useful in locating GUID in registry .


 


 


Additionally, you may see these errors as well in Summary.txt under Hotfix folder :


 


———————————————————————————-


Error Number              : 1642


Error Description         : Unable to install Windows Installer MSP file


———————————————————————————-


Error Number              : 1612


Error Description         : Unable to install Windows Installer MSP file


———————————————————————————-


Error Number              : 1646


Error Description         : Unable to install Windows Installer MSP file


———————————————————————————-


 


Please see KB304888 for a list of error codes and error messages for Windows Installer processes.


 


Some More Information :


 


Service Pack/Hotfix/GDR/CU contains MSP files as compared to RTM product which has MSI files.


 


What is MSP ?


——————–


A MSP (Microsoft Software Patch) is basically a set of transforms (modifications) against a baseline MSI (Microsoft Software Installer) file.  When a MSP is installed, instead of updating the contents of the cached MSI (modifying it according to the transforms included in the MSP), Windows Installer simply caches the MSP.  Then each time the MSI is run, the cached MSP is applied on the fly again.  The reason it works this way is to simplify the authoring and building of MSPs, so that each MSP can be built only against RTM and not have to know about all the possible MSPs that have been released since then.  For example, when SP2 is applied the SP1 patch is obsolete and Windows Installer just applies SP2 directly against the cached contents of the RTM product.


 


 



Prashant Kumar
SE, Microsoft SQL Server


 

Comments (26)

  1. Mark says:

    A very fine blog posting on msp/installer errors.  I think it is the most concise I have read.  Great job!

  2. Environment : è Windows Server 2003 SP2 x64 è SQL Server 2005 Standard Edition SP2 x86 Build 9.00.3215

  3. Aleks says:

    Thanks a lot for this post!

    You just forgot to mention that we need do all these steps for DTS, NS, RS, OLAP and so on.

    It works really great!

  4. prkuma says:

    Aleks, thank you for the feedback . I would add the instruction for other components as well.

  5. Susheel says:

    Hi,

    First of all a big thanks for this post. Its precise and pretty clear. with this Post i can able to upgrade all the sql services expect client component tools. Its giving the following error message

    Microsoft SQL Server 2005 Tools – Update ‘Service Pack 2 for SQL Server Tools and Workstation Components 2005 ENU (KB921896)’ could not be removed. Error code 1646

    Update ‘Hotfix 3257 for SQL Server Tools and Workstation Components 2005 ENU (KB951217)’ could not be removed. Error code 1646.

    Please help me

  6. CBaum says:

    Having the problem that I don’t find the GUID and the PatchCode from my log files in my registry  

    Help 🙁

  7. Colin Smith says:

    this post is Awesome!!! Thank you for the great explanation of what is occurring here and how to resolve the issue. You just saved me a call to MS. Thanks again.

  8. Bill Duncan says:

    This is a great article.  My only question is, why are the files missing?  Does this mean that maybe the installer directory contents got deleted?  Further explanation would be appreciated.

  9. I noticed SQL updates (KB960089 but also SQL SP3) were failing to apply on the WSS Developer VM. After

  10. Consider a scenario where an upgrade from SQL 2005 to SQL 2008 fails with the following messages while

  11. David says:

    Awesome work on this article. In my case the guid and patchcode were missing from the registry. I had made a note of my SQL version (for DR purposes) prior to running the SP3 install and took a shot in the dark that the previous version (which correlated to SP1) would be the MSP it was looking for. It appears to have straightened out the issue.

  12. Tiago Viana says:

    Just Brilliant! I couldn’t install SP3 properly. The .msi and .msp files were missing from the installer directory… Probably due to a prior C: drive unenlightened cleanup.

  13. Nor Ikhwan says:

    Thank you for the concise explanation! I’m supporting a server that has MS SQL 2005 installation and my Database team came to me with this problem (they just attached the log files). This post really helps me to understand the logs and eventually solved the problem.

  14. Pete says:

    The information contained in this outline has been a tremendous help.  Although the process is not fast, being able to rebuild is perfect.  Thank you for all the good, factual information and direction.

  15. Paul says:

    From my file SQL9_Hotfix_KB970892_sqlrun_sql.msp.log :

              ******* Product: {2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F}

              ******* Action:

              ******* CommandLine: **********

    MSI (s) (7C:20) [16:57:26:481]: Machine policy value ‘DisableUserInstalls’ is 0

    MSI (s) (7C:20) [16:57:26:481]: Adding MSIINSTANCEGUID to command line.

    MSI (s) (7C:20) [16:57:26:481]: Warning: Local cached package ‘c:WindowsInstaller386f10.msi’ is missing.

    MSI (s) (7C:20) [16:57:26:481]: User policy value ‘SearchOrder’ is ‘nmu’

    MSI (s) (7C:20) [16:57:26:481]: User policy value ‘DisableMedia’ is 0

    MSI (s) (7C:20) [16:57:26:481]: Machine policy value ‘AllowLockdownMedia’ is 1

    MSI (s) (7C:20) [16:57:26:481]: SOURCEMGMT: Looking for sourcelist for product {2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F}

    MSI (s) (7C:20) [16:57:26:481]: SOURCEMGMT: Adding {2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F}; to potential sourcelist list (pcode;disk;relpath).

    MSI (s) (7C:20) [16:57:26:481]: SOURCEMGMT: Now checking product {2AFFFDD7-ED85-4A90-8C52-5DA9EBDC9B8F}

    MSI (s) (7C:20) [16:57:26:481]: SOURCEMGMT: Attempting to use LastUsedSource from source list.

    MSI (s) (7C:20) [16:57:26:481]: SOURCEMGMT: Trying source c:cb9ccd801d1adca8c69f0febSetup.

    MSI (s) (7C:20) [16:57:26:481]: Note: 1: 1402 2: HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer 3: 2

    MSI (s) (7C:20) [16:57:26:481]: Note: 1: 2203 2: c:cb9ccd801d1adca8c69f0febSetupsqlrun_sql.msi 3: -2147287037

    MSI (s) (7C:20) [16:57:26:481]: SOURCEMGMT: Source is invalid due to missing/inaccessible package.

    I can’t find this ProductCode in the registry ???

  16. SQLRocker says:

    This doc works.

    To find ProductCode in registry:

    Taking above example.

    GUID          = {2373A92B-1C1C-4E71-B494-5CA97F96AA19}

    PatchCode     = {4A35EF4A-D868-4B15-A84D-3E8925AA9558}

    Follow http://kb.flexerasoftware.com/selfservice/viewContent.do?externalID=Q105971, as said in the above doc

    New GUID = B29A3732C1C117E44B49C59AF769AA91

    New PatchCode = A4FE53A4868D51B48AD4E39852AA5985

    Now goto,

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionInstallerUserDataS-1-5-18ProductsB29A3732C1C117E44B49C59AF769AA91PatchesA4FE53A4868D51B48AD4E39852AA5985

    You should find Display Name on the right pane.

  17. George says:

    Hi,

    the hint is not working for me.

    I cannot find the GUID and PATCHID.

    Here is my log, after changing the files in the folder INSTALLER.

    === Verbose logging started: 2/17/2010  15:25:05  Build type: SHIP UNICODE 3.01.4000.4042  Calling process: c:a5454b1793ebd7942bf67387c376hotfix.exe ===

    MSI (c) (EC:44) [15:25:05:967]: Resetting cached policy values

    MSI (c) (EC:44) [15:25:05:967]: Machine policy value ‘Debug’ is 0

    MSI (c) (EC:44) [15:25:05:967]: ******* RunEngine:

              ******* Product: {1DD463C0-A50A-4394-B7E4-5895C02F9E0D}

              ******* Action:

              ******* CommandLine: **********

    MSI (c) (EC:44) [15:25:05:967]: Client-side and UI is none or basic: Running entire install on the server.

    MSI (c) (EC:44) [15:25:05:967]: Grabbed execution mutex.

    MSI (c) (EC:44) [15:25:05:983]: Cloaking enabled.

    MSI (c) (EC:44) [15:25:05:983]: Attempting to enable all disabled priveleges before calling Install on Server

    MSI (c) (EC:44) [15:25:05:983]: Incrementing counter to disable shutdown. Counter after increment: 0

    MSI (s) (F0:0C) [15:25:05:983]: Grabbed execution mutex.

    MSI (s) (F0:40) [15:25:05:983]: Resetting cached policy values

    MSI (s) (F0:40) [15:25:05:983]: Machine policy value ‘Debug’ is 0

    MSI (s) (F0:40) [15:25:05:983]: ******* RunEngine:

              ******* Product: {1DD463C0-A50A-4394-B7E4-5895C02F9E0D}

              ******* Action:

              ******* CommandLine: **********

    MSI (s) (F0:40) [15:25:05:983]: Machine policy value ‘DisableUserInstalls’ is 0

    MSI (s) (F0:40) [15:25:05:983]: Warning: The package code in the cached package ‘C:WINDOWSInstallerc20cc.msi’ does not match the registered package code.  Cached package will be ignored.

    MSI (s) (F0:40) [15:25:05:983]: User policy value ‘SearchOrder’ is ‘nmu’

    MSI (s) (F0:40) [15:25:05:983]: User policy value ‘DisableMedia’ is 0

    MSI (s) (F0:40) [15:25:05:983]: Machine policy value ‘AllowLockdownMedia’ is 0

    MSI (s) (F0:40) [15:25:05:983]: SOURCEMGMT: Media enabled only if package is safe.

    MSI (s) (F0:40) [15:25:05:983]: SOURCEMGMT: Looking for sourcelist for product {1DD463C0-A50A-4394-B7E4-5895C02F9E0D}

    MSI (s) (F0:40) [15:25:05:983]: SOURCEMGMT: Adding {1DD463C0-A50A-4394-B7E4-5895C02F9E0D}; to potential sourcelist list (pcode;disk;relpath).

    MSI (s) (F0:40) [15:25:05:983]: SOURCEMGMT: Now checking product {1DD463C0-A50A-4394-B7E4-5895C02F9E0D}

    MSI (s) (F0:40) [15:25:05:983]: SOURCEMGMT: Media is enabled for product.

    MSI (s) (F0:40) [15:25:05:983]: SOURCEMGMT: Attempting to use LastUsedSource from source list.

    MSI (s) (F0:40) [15:25:05:983]: SOURCEMGMT: Trying source I:SoftwareMicrosoftSQL server 2005Disc2Setup.

    MSI (s) (F0:40) [15:25:06:030]: Incrementing counter to disable shutdown. Counter after increment: 0

    MSI (s) (F0:40) [15:25:06:030]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1

    MSI (s) (F0:40) [15:25:06:030]: Entering CMsiConfigurationManager::SetLastUsedSource.

    MSI (s) (F0:40) [15:25:06:030]: Specifed source is already in a list.

    MSI (s) (F0:40) [15:25:06:030]: User policy value ‘SearchOrder’ is ‘nmu’

    MSI (s) (F0:40) [15:25:06:030]: Machine policy value ‘DisableBrowse’ is 0

    MSI (s) (F0:40) [15:25:06:030]: Machine policy value ‘AllowLockdownBrowse’ is 0

    MSI (s) (F0:40) [15:25:06:030]: Adding new sources is allowed.

    MSI (s) (F0:40) [15:25:06:030]: Set LastUsedSource to: I:SoftwareMicrosoftSQL server 2005Disc2Setup.

    MSI (s) (F0:40) [15:25:06:030]: Set LastUsedType to: n.

    MSI (s) (F0:40) [15:25:06:030]: Set LastUsedIndex to: 3.

    MSI (s) (F0:40) [15:25:06:030]: SOURCEMGMT: Resolved source to: ‘I:SoftwareMicrosoftSQL server 2005Disc2Setup’

    MSI (s) (F0:40) [15:25:06:077]: File will have security applied from OpCode.

    MSI (s) (F0:40) [15:25:12:608]: SOFTWARE RESTRICTION POLICY: Verifying package –> ‘I:SoftwareMicrosoftSQL server 2005Disc2SetupSqlRun_Tools.msi’ against software restriction policy

    MSI (s) (F0:40) [15:25:12:608]: SOFTWARE RESTRICTION POLICY: I:SoftwareMicrosoftSQL server 2005Disc2SetupSqlRun_Tools.msi has a digital signature

    MSI (s) (F0:40) [15:25:13:702]: SOFTWARE RESTRICTION POLICY: I:SoftwareMicrosoftSQL server 2005Disc2SetupSqlRun_Tools.msi is permitted to run at the ‘unrestricted’ authorization level.

    MSI (s) (F0:40) [15:25:13:702]: End dialog not enabled

    MSI (s) (F0:40) [15:25:13:702]: Original package ==> I:SoftwareMicrosoftSQL server 2005Disc2SetupSqlRun_Tools.msi

    MSI (s) (F0:40) [15:25:13:702]: Package we’re running from ==> C:WINDOWSInstallerd3b410.msi

    MSI (s) (F0:40) [15:25:13:780]: APPCOMPAT: looking for appcompat database entry with ProductCode ‘{1DD463C0-A50A-4394-B7E4-5895C02F9E0D}’.

    MSI (s) (F0:40) [15:25:13:780]: APPCOMPAT: no matching ProductCode found in database.

    MSI (s) (F0:40) [15:25:13:780]: Opening existing patch ‘C:WINDOWSInstaller1487a2.msp’.

    MSI (s) (F0:40) [15:25:13:780]: Opening existing patch ‘C:WINDOWSInstallercc2b5ae.msp’.

    MSI (s) (F0:40) [15:25:13:780]: Note: 1: 2203 2: C:WINDOWSInstallercc2b5ae.msp 3: -2147287038

    MSI (s) (F0:40) [15:25:13:780]: Couldn’t find local patch ‘C:WINDOWSInstallercc2b5ae.msp’. Looking for it at its source.

    MSI (s) (F0:40) [15:25:13:780]: Resolving Patch source.

    MSI (s) (F0:40) [15:25:13:780]: User policy value ‘SearchOrder’ is ‘nmu’

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Media enabled only if package is safe.

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Looking for sourcelist for product {71E59621-72C0-4987-B3BD-A5E3E48F8627}

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Adding {71E59621-72C0-4987-B3BD-A5E3E48F8627}; to potential sourcelist list (pcode;disk;relpath).

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Now checking product {71E59621-72C0-4987-B3BD-A5E3E48F8627}

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Media is enabled for product.

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Attempting to use LastUsedSource from source list.

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Trying source d:1b11aa64aae8bdb7e1d40a5eHotFixToolsFiles.

    MSI (s) (F0:40) [15:25:13:780]: Note: 1: 2203 2: d:1b11aa64aae8bdb7e1d40a5eHotFixToolsFilessqlrun_tools.msp 3: -2147287037

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Source is invalid due to missing/inaccessible package.

    MSI (s) (F0:40) [15:25:13:780]: Note: 1: 1706 2: -2147483647 3: sqlrun_tools.msp

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Processing net source list.

    MSI (s) (F0:40) [15:25:13:780]: Note: 1: 1706 2: -2147483647 3: sqlrun_tools.msp

    MSI (s) (F0:40) [15:25:13:780]: SOURCEMGMT: Processing media source list.

    MSI (s) (F0:40) [15:25:14:811]: SOURCEMGMT: Resolved source to: ‘sqlrun_tools.msp’

    MSI (s) (F0:40) [15:25:14:811]: Note: 1: 1314 2: sqlrun_tools.msp

    MSI (s) (F0:40) [15:25:14:811]: Unable to create a temp copy of patch ‘sqlrun_tools.msp’.

    MSI (s) (F0:40) [15:25:14:811]: Note: 1: 1708

    MSI (s) (F0:40) [15:25:14:811]: Note: 1: 2729

    MSI (s) (F0:40) [15:25:14:811]: Note: 1: 2729

    MSI (s) (F0:40) [15:25:14:811]: Product: Microsoft SQL Server 2005 Tools — Installation failed.

    MSI (s) (F0:40) [15:25:14:827]: 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.

    I:SoftwareMicrosoftSQL server 2005Disc2SetupSqlRun_Tools.msi

    MSI (c) (EC:44) [15:25:14:936]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1

    MSI (c) (EC:44) [15:25:14:936]: MainEngineThread is returning 1635

    === Verbose logging stopped: 2/17/2010  15:25:14 ===

  18. Not Awesome says:

    There really should be an automated mechanism for dealing with this.  Admins who find all of these patch directories lying around on their machine are likely to eventually clean them out not knowing that a directory called 05ba72b40ba6b4d61d14cd3c3283 is going to be necessary a year in the future.  This doesn’t seem to be a problem with any of the other Microsoft apps…there really should be a better way.  For those of us who have ignorantly cleaned up these folders, we have to spend a lot of time just to apply SP3 when time is already at a premium.  Please change the installers to contain files that they need so it can automatically find what it needs rather than relying on your customer to figure out what it needs.

  19. Denelle says:

    can u help having problems dont have SQLEVN70.RLL and SQL Server 2005 wont finish downloading stops at hotfix and gives error

    Time: 04/09/2010 13:44:28.328

    KB Number: KB970892

    Machine: DENELLE

    OS Version: Microsoft Windows XP Professional Service Pack 3 (Build 2600)

    Package Language: 1033 (ENU)

    Package Platform: x86

    Package SP Level: 3

    Package Version: 4053

    Command-line parameters specified:

        /quiet

        /allinstances

    Cluster Installation: No

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

    Prerequisites Check & Status

    SQLSupport: Passed

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

    Products Detected                         Language  Level  Patch Level       Platform  Edition

    SQL Server Database Services 2005 (NR2007)  ENU       SP3    2005.090.4035.00  x86       EXPRESS

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

    Products Disqualified & Reason

    Product                                   Reason

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

    Processes Locking Files

    Process Name          Feature               Type          User Name                  PID

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

    Product Installation Status

    Product                   : SQL Server Database Services 2005 (NR2007)

    Product Version (Previous): 4035

    Product Version (Final)   :

    Status                    : Failure

    Log File                  : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB970892_sqlrun_sql.msp.log

    SQL Express Features      :

    Error Number              : 29528

    Error Description         : MSP Error: 29528  The setup has encountered an unexpected error while Installing performance counters. The error is: The specified path is invalid.

    ———————————————————————————-

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

    Summary

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

        Exit Code Returned: 29528

  20. Vin says:

    this was perfectly explained on how to troubleshoot and resolve the sql server installation error message  "MainEngineThread is returning 1635"

    thanks!

  21. Cedric says:

    Great article !

    Another way is to use the following scripts, it will scan and repair the missing packages

    support.microsoft.com/default.aspx

  22. Tom P says:

    if someone works for Microsoft, perhaps they can post the MSI-Moksha.v4.6.exe.  This is an executable created by MSFT to take the guess work out of that patches are missing (MSI or MSP) and sends you the information needed to find the proper version.  A sample of the output is below.  The MSI files come from the original SQL server installation.  The MSP files are identified and they tell you what KB # that contains the download file in question.  

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

    REPORT SUMMARY

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

    Missing installer package file "4495c.msi" for "Microsoft SQL Server 2005 Backward compatibility"

    Missing installer package file "fee050.msi" for "Microsoft SQL Server 2005 Tools"

    Missing installer cache file "449da.msp" for Patch "Hotfix 3175 for SQL Server Tools and Workstation Components 2005 ENU (KB936305)" on "Microsoft SQL Server 2005 Tools"

    KB Article = "Hotfix;936305;ENU;support.microsoft.com

    Missing installer cache file "44919.msp" for Patch "Service Pack 2 for SQL Server Tools and Workstation Components 2005 ENU (KB921896)" on "Microsoft SQL Server 2005 Tools"

  23. Balmukund says:

    Hi Tom,

    We also have below KBs to solve this problem.

    support.microsoft.com/…/2015100

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

    support.microsoft.com/…/969052

    How to restore the missing Windows Installer cache files and resolve problems encountered during SQL Server update

    Regards,

    Balmukund

  24. Tom G says:

    Excellent blog! We tried everything to get SP3 installed with no luck; we finally committed to a full uninstall of all SQL components and that failed too! Following these steps (we had to 'restore' the missing .msi and .msp files to installer directory) we were able to make it happen. Thanks for the detailed instructions!

  25. Shannon says:

    Check your recycle bin; all of my missing .msi files were in there. restored them, and the sp ran.