{"id":773,"date":"2009-03-12T19:54:37","date_gmt":"2009-03-12T19:54:37","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2009\/03\/12\/microsoft-net-1-x-and-visual-studio-7-x-patches-may-fail-to-uninstall\/"},"modified":"2019-02-17T15:29:52","modified_gmt":"2019-02-17T22:29:52","slug":"microsoft-net-1-x-and-visual-studio-7-x-patches-may-fail-to-uninstall","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/microsoft-net-1-x-and-visual-studio-7-x-patches-may-fail-to-uninstall\/","title":{"rendered":"Microsoft .NET 1.x and Visual Studio 7.x patches may fail to uninstall"},"content":{"rendered":"<p>When attempting to uninstall a patch from the products listed in the <strong>Applies To<\/strong> section below, the following error may occur.<\/p>\n<blockquote>\n<p>Internal Error 2771. M953297<\/p>\n<\/blockquote>\n<p>The last part of the error message will vary with each patch, where the last 6 digits are the knowledge base article related to the patch.<\/p>\n<h3>Applies To<\/h3>\n<ul>\n<li>Microsoft .NET Framework 1.0 <\/li>\n<li>Microsoft .NET Framework 1.1 <\/li>\n<li>Microsoft Visual Studio .NET 2002 <\/li>\n<li>Microsoft Visual Studio .NET 2003 <\/li>\n<li>Microsoft Visual C++ .NET 2003 <\/li>\n<li>Microsoft Visual C# .NET 2003 <\/li>\n<li>Microsoft Visual Basic .NET 2003 <\/li>\n<\/ul>\n<h3>Workaround<\/h3>\n<p>One possible reason the error has occurred is because a system policy is set. You can temporarily disable this system policy and attempt to reinstall the patch.<\/p>\n<blockquote>\n<p><b>Warning<\/b> If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.<\/p>\n<\/blockquote>\n<p>You need to disable the <a href=\"http:\/\/msdn.microsoft.com\/library\/aa368364.aspx\">EnforceUpgradeComponentRules<\/a> Windows Installer system policy using the steps below.<\/p>\n<ol>\n<li>Click <strong>Start<\/strong> and then click <strong>Run<\/strong>. <\/li>\n<li>In the <strong>Open<\/strong> box, type <em>regedit.exe<\/em> and click <strong>OK<\/strong>. If you are prompted with a User Account Control (UAC) dialog, please authenticate as an administrator or click <strong>Continue<\/strong>. <\/li>\n<li>Browse to the key <code>HKEY_LOCAL_MACHINESoftwarePoliciesMicrosoftWindowsInstaller<\/code>. <\/li>\n<li>Delete the registry value <code>EnforceUpgradeComponentRules<\/code> and close the registry editor. <\/li>\n<li>Click <strong>Start<\/strong> and then click <strong>Run<\/strong>. <\/li>\n<li>In the <strong>Open<\/strong> box, type <em>services.msc<\/em> and click <strong>OK<\/strong>. If you are prompted with a User Account Control (UAC) dialog, please authenticate as an administrator or click <strong>Continue<\/strong>. <\/li>\n<li>Right click on <strong>Windows Installer<\/strong> and click on <strong>Stop<\/strong>. It is okay if the <strong>Stop<\/strong> button is disable: the service was already stopped. <\/li>\n<li>Attempt to reinstall the patch. <\/li>\n<\/ol>\n<p>To optionally re-enable the EnforceUpgradeComponentRules system policy, follow the steps below.<\/p>\n<ol>\n<li>Click <strong>Start<\/strong> and then click <strong>Run<\/strong>. <\/li>\n<li>In the <strong>Open<\/strong> box, type <em>regedit.exe<\/em> and click <strong>OK<\/strong>. If you are prompted with a User Account Control (UAC) dialog, please authenticate as an administrator or click <strong>Continue<\/strong>. <\/li>\n<li>Browse to the key <code>HKEY_LOCAL_MACHINESoftwarePoliciesMicrosoftWindowsInstaller<\/code>. <\/li>\n<li>Right click on the <code>Installer<\/code> key and select <strong>New<\/strong>, then <strong>DWORD<\/strong>. <\/li>\n<li>Type the name <code>EnforceUpgradeComponentRules<\/code> and press <strong>Enter<\/strong>. <\/li>\n<li>Double click the value you just created, then type 1 and press <strong>Enter<\/strong>. <\/li>\n<li>Close the registry editor. <\/li>\n<\/ol>\n<h3>Details<\/h3>\n<p>Patches created for the products listed in the <strong>Applies To<\/strong> section above support the appearance of uninstall by installing an obsolescing patch and installing older baseline files. Back when these products were first released and entered the servicing lifecycle, Windows Installer did not support real patch uninstall. The only way to uninstall patches back then was to installing a patch that obsolesces (the predecessor to supersedence) another patch, optionally carrying a file payload to avoid prompts for source to replace older files. This is shown in the log fragment below where the &#8220;anti-patch&#8221; <code>{D5C479FB-3609-4A1D-A106-830635BF50B0}<\/code> obsolesces the related patch <code>{AAC3F1F0-5649-4670-A698-F1523729F015}<\/code>.<\/p>\n<p><code>MSI (c) (14:DC) [02:44:31:310]: Final Patch Application Order:      <br \/>MSI (c) (14:DC) [02:44:31:310]: {411EDCF7-755D-414E-A74B-3DCD6583F589} -       <br \/>MSI (c) (14:DC) [02:44:31:310]: {D5C479FB-3609-4A1D-A106-830635BF50B0} - D:UsersTestAppDataLocalTempMSPE928.tmp       <br \/>MSI (c) (14:DC) [02:44:31:310]: Other Patches:       <br \/>MSI (c) (14:DC) [02:44:31:310]: Obsolete: {AAC3F1F0-5649-4670-A698-F1523729F015} - <\/code><\/p>\n<p>So because another patch is being installed, it <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2006\/01\/23\/516457.aspx\">cannot remove components from an existing feature<\/a>. When the EnforceUpgradeComponentRules Windows Installer system policy is set, the installation will fail as shown below.<\/p>\n<p><code>MSI (s) (EC:C8) [02:44:34:835]: Machine policy value 'EnforceUpgradeComponentRules' is 1      <br \/>MSI (s) (EC:C8) [02:44:34:835]: SELMGR: Component 'DDPatch.UpdateGac' is registered to feature 'M953297', but is not present in the FeatureComponents table.&nbsp; Removal of components from a feature is not supported!       <br \/>MSI (s) (EC:C8) [02:44:34:835]: Note: 1: 2771 2: M953297<\/code><\/p>\n<p>This does not otherwise pose a problem because the patch is being uninstalled and the feature affected is specific only to that patch. And if the patch is reinstalled, the feature is explicitly added locally by a custom action anyway since Windows Installer back then also did not automatically determine feature actions during patch installation.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When attempting to uninstall a patch from the products listed in the Applies To section below, the following error may occur. Internal Error 2771. M953297 The last part of the error message will vary with each patch, where the last 6 digits are the knowledge base article related to the patch. Applies To Microsoft .NET [&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":[3,20,23,45],"class_list":["post-773","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-net","tag-installation","tag-logging","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>When attempting to uninstall a patch from the products listed in the Applies To section below, the following error may occur. Internal Error 2771. M953297 The last part of the error message will vary with each patch, where the last 6 digits are the knowledge base article related to the patch. Applies To Microsoft .NET [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/773","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=773"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/773\/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=773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}