Troubleshooting SQL Server Upgrade Issues

Recently, one of my partners, were facing issues upgrading SQL server 2008 from Service Pack 2 to Service Pack 3. 

On checking the summary.txt in the setup bootstrap logs found the following error information :

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

Final result: The patch installer has failed to update the shared features. To determine the reason for failure, review the log files.
Exit code (Decimal): -2068578304
Exit facility code: 1204
Exit error code: 0
Exit message: The INSTALLSHAREDWOWDIR command line value is not valid. Please ensure the specified path is valid and different than the INSTALLSHAREDDIR path.

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

And on the detail.txt logs could see the below error information :

Slp: Validation for setting 'InstallSharedWowDir' failed. Error message: The INSTALLSHAREDWOWDIR command line value is not valid. Please ensure the specified path is valid and different than the INSTALLSHAREDDIR path.
Slp: Error: Action "Microsoft.SqlServer.Configuration.SetupExtension.ValidateFeatureSettingsAction" threw an exception during execution.
Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: The INSTALLSHAREDWOWDIR command line value is not valid. Please ensure the specified path is valid and different than the INSTALLSHAREDDIR path.

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

Looking at it, I could nail the issue down to two possible suspects :- Permissions issue or Registry key entry corruption

++ Checking on permissions, the user was the local administrator and had all the required set of permissions.

++ Thus took a process monitor trace on the next launch of the upgrade to figure out when the process is failing which was the registry key invoked.

On analyzing the trace, I could find out that the setup.exe was checking the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\100\VerSpecificRootDir and thus could figure out that the WOW32 execution folder of SQL server 2008 R2 was not set correctly.

Checked the value of the string 'B1D55012528AA294F86D6C035CEAC33B' at the registry key path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\C90BFAC020D87EA46811C836AD3C507F and it was found to be "C:\Program Files (x86)\Microsoft SQL Server\"

On a precautionary note, backed up the registry keys.

Later modified the value of the registry key 'VerSpecificRootDir' in the path HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\100 from "C:\Program Files (x86)\Microsoft SQL Server\100" to "C:\Program Files (x86)\Microsoft SQL Server\ ".

Rebooted the server once and thus the upgrade went through seamlessly and thus we had the SQL Server upgraded from Service Pack 2 to Service Pack 3.

Hope this helps.. Happy troubleshooting!!