Microsoft .NET 1.x and Visual Studio 7.x patches may fail to uninstall

Heath Stewart

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 Framework 1.0
  • Microsoft .NET Framework 1.1
  • Microsoft Visual Studio .NET 2002
  • Microsoft Visual Studio .NET 2003
  • Microsoft Visual C++ .NET 2003
  • Microsoft Visual C# .NET 2003
  • Microsoft Visual Basic .NET 2003

Workaround

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.

Warning 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.

You need to disable the EnforceUpgradeComponentRules Windows Installer system policy using the steps below.

  1. Click Start and then click Run.
  2. In the Open box, type regedit.exe and click OK. If you are prompted with a User Account Control (UAC) dialog, please authenticate as an administrator or click Continue.
  3. Browse to the key HKEY_LOCAL_MACHINESoftwarePoliciesMicrosoftWindowsInstaller.
  4. Delete the registry value EnforceUpgradeComponentRules and close the registry editor.
  5. Click Start and then click Run.
  6. In the Open box, type services.msc and click OK. If you are prompted with a User Account Control (UAC) dialog, please authenticate as an administrator or click Continue.
  7. Right click on Windows Installer and click on Stop. It is okay if the Stop button is disable: the service was already stopped.
  8. Attempt to reinstall the patch.

To optionally re-enable the EnforceUpgradeComponentRules system policy, follow the steps below.

  1. Click Start and then click Run.
  2. In the Open box, type regedit.exe and click OK. If you are prompted with a User Account Control (UAC) dialog, please authenticate as an administrator or click Continue.
  3. Browse to the key HKEY_LOCAL_MACHINESoftwarePoliciesMicrosoftWindowsInstaller.
  4. Right click on the Installer key and select New, then DWORD.
  5. Type the name EnforceUpgradeComponentRules and press Enter.
  6. Double click the value you just created, then type 1 and press Enter.
  7. Close the registry editor.

Details

Patches created for the products listed in the Applies To 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 “anti-patch” {D5C479FB-3609-4A1D-A106-830635BF50B0} obsolesces the related patch {AAC3F1F0-5649-4670-A698-F1523729F015}.

MSI (c) (14:DC) [02:44:31:310]: Final Patch Application Order:
MSI (c) (14:DC) [02:44:31:310]: {411EDCF7-755D-414E-A74B-3DCD6583F589} -
MSI (c) (14:DC) [02:44:31:310]: {D5C479FB-3609-4A1D-A106-830635BF50B0} - D:UsersTestAppDataLocalTempMSPE928.tmp
MSI (c) (14:DC) [02:44:31:310]: Other Patches:
MSI (c) (14:DC) [02:44:31:310]: Obsolete: {AAC3F1F0-5649-4670-A698-F1523729F015} -

So because another patch is being installed, it cannot remove components from an existing feature. When the EnforceUpgradeComponentRules Windows Installer system policy is set, the installation will fail as shown below.

MSI (s) (EC:C8) [02:44:34:835]: Machine policy value 'EnforceUpgradeComponentRules' is 1
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.  Removal of components from a feature is not supported!
MSI (s) (EC:C8) [02:44:34:835]: Note: 1: 2771 2: M953297

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.

0 comments

Discussion is closed.

Feedback usabilla icon