Sometimes I wonder if SQL 2008's installer was really put through the paces in its beta test.  I have encountered more bugs with it than any other installer, with the possible exception of TFS.

Anyway, so I was trying to install 2008 Management Studio on a workstation this afternoon and ran into my old friend, the MsiGetProductInfo installation error.  Having encountered it before, it was an easy fix.

However, a few steps later I ran into a new error...

SQL Server 2005 Express Tools : Failed 

The installer was telling me that it couldn't proceed because SQL Server 2005 Express Tools was installed.  This was odd because this machine had never had any version of SQL Express or its tools installed.  SQL 2005 Management Studio was installed, but this never prohibited me from installing SQL 2008 Management Studio before.  I went to the Live Search, the Yahoo Search, and the Google, but could not find a satisfactory resolution.  The only advice that seemed to solve the problem for anybody else required uninstalling everything SQL related.  That's just silly!

I concluded the pre-req checker must be wrong.  I decided it was time to analyze what the pre-req checker was doing and try to find a workaround for it.  I fired up Process Monitor (aka ProcMon) and examined what setup was looking at when I clicked on Re-run.  The installer's process name is setup100.exe, so I filtered by that name.  There were a ton of entries, so I filtered by registry entries only since I speculated that a check that looks to see if an app is installed would be isolated to the registry.  There were still a lot of entries.  I began to exclude entries I knew it would not be and looked through the list line-by-line.  I found a candidate. 

SQL 2005 is technically version 9.0.  The SQL team doesn't like decimal places, so folder paths and registry keys tend to use version numbers like 80, 90, and 100 (for 2000, 2005, and 2008, respectively).  I found the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90 was being looked at in a few places.  This was the only time I saw anything related to SQL 2005.  I renamed that key in regedit to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90xx and re-ran the test. 

Success!  But we're not done yet.

SQL 2008 will write entries into HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90 on its own.  We need to merge the old key with the new key without breaking setup.  It's pretty easy.

  1. Install SQL 2008 as normal from this point forward (leaving "90" renamed to "90xx").
  2. When it is finished, export the new "90" key to a file using regedit.
  3. Delete the new "90" key.
  4. Rename the "90xx" key back to "90."
  5. Import the file you exported earlier and overwrite the values in "90."

Mystery solved.