{"id":1823,"date":"2006-12-17T13:11:25","date_gmt":"2006-12-17T13:11:25","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2006\/12\/17\/detecting-visual-studio-2005-service-pack-1\/"},"modified":"2019-02-17T15:30:27","modified_gmt":"2019-02-17T22:30:27","slug":"detecting-visual-studio-2005-service-pack-1","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/detecting-visual-studio-2005-service-pack-1\/","title":{"rendered":"Detecting Visual Studio 2005 Service Pack 1"},"content":{"rendered":"<p>Now that <a href=\"http:\/\/msdn.microsoft.com\/vstudio\/support\/vs2005sp1\/\">Visual Studio 2005 Service Pack 1<\/a> is released, it can be detected programmatically in various ways. Registry detection is recommended for ease and is less impacted by future changes to the product installation. Because there are many different Visual Studio 2005 editions and service pack 1 patch packages, you may need to perform several patch existence tests if you support a more general scope. For example, if you have a plug-in that supports Visual Studio 2005 Standard, Professional, or Team editions &ndash; regardless of languages &ndash; you may need to perform 9 tests for all the supported languages service pack 1 targets.<\/p>\n<p>All the registry keys I <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2006\/04\/07\/571241.aspx\">previously documented<\/a> are still supported as required, so you can determine if a service pack is installed for a particular product given its <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/productname.asp\">ProductName<\/a> (which is always in English, which is not necessarily the name you&#8217;ll see in Add\/Remove Programs) and the KB number of the service pack patch. The other registry keys I document below may not be supported in future versions.\n<\/p>\n<p>If you don&#8217;t need to be specific about a particular Visual Studio 2005 SKU, you can detect SP1 for a particular written language (for VSTS and TFS) or for a particular project language (for Express SKUs) using an older registry key under,\n<\/p>\n<p><span style=\"font-family:Consolas\">HKEY_LOCAL_MACHINESoftwareMicrosoftActive SetupInstalled Components{PatchCode}<\/span>\n\t<\/p>\n<p>You can find the {PatchCode} in the <em>.msp<\/em> file. In Windows 2003 and earlier platforms, you&#8217;ll see this as the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/revision_number_summary.asp\">Revision number property<\/a> in the properties Summary tab in Windows Explorer. In all cases, you can query the Summary Information stream or open the <em>.msp<\/em> file in Orca, then click the <strong>View<\/strong> -&gt; <strong>Summary Information<\/strong> menu item.\n<\/p>\n<p>For the English Visual Studio 2005 Service Pack 1 for Standard, Professional, and Team editions (<a href=\"http:\/\/www.microsoft.com\/downloads\/details.aspx?familyid=BB4A75AB-E2D4-4C96-B39D-37BAF6B5B1DC&amp;displaylang=en\">VS80sp1-KB926601-X86-ENU<\/a>) an example of the registry key above follows.\n<\/p>\n<p><span style=\"font-family:Consolas\">HKEY_LOCAL_MACHINESoftwareMicrosoftActive SetupInstalled Components{D93F9C7C-AB57-44C8-BAD6-1494674BCAF7}\n<\/span><\/p>\n<p>You can also determine the service pack level of a more general, larger scope by reading a <span style=\"font-family:Consolas\">REG_DWORD<\/span> registry value named <span style=\"font-family:Consolas\">SP<\/span> from under,\n<\/p>\n<p>\n\t\t<span style=\"font-family:Consolas\">HKEY_LOCAL_MACHINESoftwareMicrosoftDevDiv[ProductFamily]Servicing8.0\n<\/span><\/p>\n<p> &hellip;and for a specific language SKU using a sub-key,\n<\/p>\n<p><span style=\"font-family:Consolas\">HKEY_LOCAL_MACHINESoftwareMicrosoftDevDiv[ProductFamily]Servicing8.0[ProductEdition][ProductLanguage]<\/span>\n\t<\/p>\n<p>Product families are pretty broad in scope, and include for &#8220;Whidbey&#8221;:\n<\/p>\n<ul>\n<li>URT (.NET Framework, once known as the Universal Runtime)\n<\/li>\n<li>VB (Microsoft Visual Basic 2005 Express)\n<\/li>\n<li>VC (Microsoft Visual C++ 2005 Express)\n<\/li>\n<li>VCS (Microsoft Visual C# 2005 Express)\n<\/li>\n<li>VJS (Microsoft Visual J# 2005 Express)\n<\/li>\n<li>VNS (Microsoft Visual Web Developer 2005 Express)\n<\/li>\n<li>VS (Visual Studio 2005 Standard, Professional, Team Suite, etc.)\n<\/li>\n<li>VSTF (Visual Studio 2005 Team Foundation Services)\n<\/li>\n<\/ul>\n<p>An example using the English Visual Studio 2005 Team Suite Service Pack 1 of the registry keys above follows. Under each key you would find a registry value named <span style=\"font-family:Consolas\">SP<\/span> set to 1.\n<\/p>\n<p><span style=\"font-family:Consolas\">HKEY_LOCAL_MACHINESoftwareMicrosoftDevDivVSServicing8.0<br \/>HKEY_LOCAL_MACHINESoftwareMicrosoftDevDivVSServicing8.0VSTS1033\n<\/span><\/p>\n<p>Visual Studio 2005 Express SKUs will always use the ProductEdition of EXP, so you can combine the ProductFamily values documented above with EXP to form registry keys like the following, for Visual C# 2005 Express.\n<\/p>\n<p><span style=\"font-family:Consolas\">HKEY_LOCAL_MACHINESoftwareMicrosoftDevDivVCSServicing8.0<br \/>HKEY_LOCAL_MACHINESoftwareMicrosoftDevDivVCSServicing8.0EXP1033\n<\/span><\/p>\n<p>Of course there are other ways, ranging from using a <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/drlocator_table.asp\">DrLocator<\/a> search in a Windows Installer package for a specific version range of a file, to actually calling Windows Installer APIs, such as <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msigetpatchinfo.asp\">MsiGetPatchInfo<\/a> or <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msigetpatchinfoex.asp\">MsiGetPatchInfoEx<\/a> with the same {PatchCode} as described above. Since for Visual Studio 2005 our service packs are <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/minor_upgrades.asp\">minor upgrade<\/a> packages, you can also use APIs that take machine state into account &ndash; like <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msiopenpackage.asp\">MsiOpenPackage<\/a> or <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/msiopenpackageex.asp\">MsiOpenPackageEx<\/a> &ndash; and check the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/msi\/setup\/productversion.asp\">ProductVersion<\/a> property since it will have changed. Note that the .NET Framework 2.0 on Vista is not Windows Installer-based, so Windows Installer query APIs cannot be used for the Framework.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that Visual Studio 2005 Service Pack 1 is released, it can be detected programmatically in various ways. Registry detection is recommended for ease and is less impacted by future changes to the product installation. Because there are many different Visual Studio 2005 editions and service pack 1 patch packages, you may need to perform [&hellip;]<\/p>\n","protected":false},"author":389,"featured_media":3843,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[13,20,45,50],"class_list":["post-1823","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-detection","tag-installation","tag-visual-studio","tag-vs2005sp1"],"acf":[],"blog_post_summary":"<p>Now that Visual Studio 2005 Service Pack 1 is released, it can be detected programmatically in various ways. Registry detection is recommended for ease and is less impacted by future changes to the product installation. Because there are many different Visual Studio 2005 editions and service pack 1 patch packages, you may need to perform [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/1823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/users\/389"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/comments?post=1823"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/1823\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media?parent=1823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=1823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=1823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}