Hello everyone,
I came across the following article in a WhatsApp group. I used to encounter similar issues while patching a SQL Server in the past, but lately, I haven’t experienced them. I believe the article contains valuable information, so I’m sharing it on my blog. All credit goes to the original author.
Error messege- Setup failed for Sqlrun_sql.msi file
For viewing the error go to C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log location and search for the latest logs.
Open the log file and you can view details in the log, looking similar like below log.
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: {4D28EFCF-5999-44D2-8D4E-AC643E76C33F}
******* 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: {4D28EFCF-5999-44D2-8D4E-AC643E76C33F}
******* 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\258fh9.msi’ is missing.
Issue
The very first error I see in the above log is Local cached package ‘C:\WINDOWS\Installer\258fh9.msi’ is missing. This file 258fh9.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.
Resolution
Now that we knew ‘C:\WINDOWS\Installer\258fh9.msi’ is missing , we need to put it back to C:\Windows\Installer. To do so , locate the file from the installation media of SQL Server , 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 258fh9.msi.
Now re-run the setup and it will execute successfully.
For Resolving the MSP file errors follow the below steps
1. Check the Product GUID from the log.
2. Check the Patch GUID from the log.
3. Open regedit
4. Navigate to below path
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\<GUID>\Patches\<PatchCode>
Where GUID and Patch Code will be gathered from logs.
5. Then see the Display name and it will give the name of the service pack whose file is missing.
6. Extract the same service pack.
7. Copy the missing file and replace it by the number.msp where number can be seen in the errorlog.
If yor are not able to find the number then navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches\<PatchCode>
And search for the patch code from the error log, and under local package you can see the filenumber.msp. Replace the file with the same number and run the setup again.