The Visual Studio 2008 RTM and SP1 detection keys are largely the same as the Visual Studio 2005 SP1 detection keys, and are documented below. But there is a caveat for released and upcoming versions: the shared detection value can be overwritten by an older installation of the same release.
For example, if you installed VS2008 Professional, then installed VS2008 SP1, and after that installed Team Foundation Client (TFC) 2008 RTM, the shared detection value is reset to 0 instead of 1. To be sure SP1 is installed, you need to detect SP1 on specific editions of Visual Studio 2008 or any other of our 2008 product releases including .NET 3.5 RTM and SP1.
Product families define a group of products with similar functionality. The “VS” product family, for example, includes many editions but defines all full SKUs of the Visual Studio IDE. To find the service pack level of a product family, search for the following registry value.
Key: HKEY_LOCAL_MACHINE\Software\Microsoft\DevDiv\[ProductFamily]\Servicing\9.0 Value (REG_DWORD): SP
HKEY_LOCAL_MACHINE\Software\Microsoft\DevDiv\[ProductFamily]\Servicing\9.0
SP
The exception is for product families “NetFX” and “WPF” that use version 3.5 instead of 9.0.
If the registry value is 0, the RTM version of the product family is installed. If the value is 1, then SP1 is installed on the product family.
Keep in mind, however, that this value is shared by all editions within a product family. If an older product edition is installed after a newer product edition within the same product family, the value will be overwritten. To detect whether SP1 is installed you need to check individual product editions.
Product families released for the 2008 wave of products include,
A product family may install one or more editions. The “VS” product family, for example, contains several editions including “PRO” (Professional"), “VSTS” (Team Suite), and more. To find the service pack level of a product edition, search for the following registry value:
Key: HKEY_LOCAL_MACHINE\Software\Microsoft\DevDiv\[ProductFamily]\Servicing\9.0\[ProductEdition]\[ProductLanguage] Value (REG_DWORD): SP
HKEY_LOCAL_MACHINE\Software\Microsoft\DevDiv\[ProductFamily]\Servicing\9.0\[ProductEdition]\[ProductLanguage]
The exceptions are for product families “NetFX” and “WPF” that use version 3.5 instead of 9.0, and do not specify a ProductEdition. For .NET itself, the language is always 1033 unless you’re detecting the SP level for a language pack that uses the LCID for a specific culture.
So for .NET, you would check the following registry value:
Key: HKEY_LOCAL_MACHINE\Software\Microsoft\DevDiv\NetFX\Servicing\3.5\1033 Value (REG_DWORD): SP
HKEY_LOCAL_MACHINE\Software\Microsoft\DevDiv\NetFX\Servicing\3.5\1033
For either Visual Studio or .NET, if the registry value is 0, the RTM versions of the product family are installed. If the value is 1, then SP1 is installed on the product family.
The ProductLanguage is the LCID of the product installed, such as 1033 for English (US).
The following table contains the list of released product families, editions, and the product names.
WiX v3 contains a number of properties to detect the SP level. Aaron Stebner has provided a good post that describes how.
Nice little tip, thanks! I wanted to search for Visual Studio 10/2010 entries in the installed updates list and check for something that looks like a "SP", this is much better.
-Ion