Upgrade from SQL 2005 to SQL 2008 might fail with MsiGetProductInfo error

Consider a scenario where an upgrade from SQL 2005 to SQL 2008 fails with the following messages while installing Setup Support Files.

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

TITLE: SQL Server Setup failure.

——————————

SQL Server Setup has encountered the following error:

MsiGetProductInfo failed to retrieve ProductVersion for package with Product Code =

‘{0826F9E4-787E-481D-83E0-BC6A57B056D5}’. Error code: 1605..

——————————-

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

From Detail_ComponentUpdate.txt –

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

2009-03-16 22:00:59 Slp: Inner exceptions are being indented

2009-03-16 22:00:59 Slp:

2009-03-16 22:00:59 Slp: Exception type: System.InvalidOperationException

2009-03-16 22:00:59 Slp: Message:

2009-03-16 22:00:59 Slp: MsiGetProductInfo failed to retrieve ProductVersion for package with Product Code = ‘{0826F9E4-787E-481D-83E0-BC6A57B056D5}’. Error code: 1608.

2009-03-16 22:00:59 Slp: Stack:

2009-03-16 22:00:59 Slp: at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.FillInstallPropertyByProductCode(PackageInstallProperty pkg, String prodCode)

2009-03-16 22:00:59 Slp: at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.FillInstallProperty(PackageInstallProperty pkg)

2009-03-16 22:00:59 Slp: at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.ExecuteAction(String actionId)

2009-03-16 22:00:59 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)

2009-03-16 22:00:59 Slp: at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)

2009-03-16 22:00:59 Slp: at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
********************************************************

SOLUTION (Worked at my end)

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

Get the Product Code = ‘{0826F9E4-787E-481D-83E0-BC6A57B056D5}’ from the error message that you are getting.

Byte reverse the first part from 0826F9E4 to 4E9F6280.

Search in the registry under HKEY_CLASSES_ROOT\Installer\UpgradeCodes and try to find a match.

Take a backup of the registry and delete the parent key.

Re-run the Upgrade and if it fails again for a different GUID, then repeat the steps stated above.

In my case, I had to repeat these steps thrice as there were 3 other locations where I needed to change the product code. Then the setup was successful.