다음을 통해 공유


How to workaround errors installing .NET Framework 2.0 that are caused by registry permission problems

I have had a few customers report problems installing the .NET Framework 2.0 with the following symptoms:

  • .NET Framework 2.0 setup fails and rolls back with no specific error message, just a generic "setup failed" message at the end
  • The action that fails is "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\regtlibv12.exe" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\mscoree.tlb" or "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\regtlibv12.exe" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\mscorlib.tlb" (you can find the error by using the steps described here)
  • The error code listed in the log file %temp%\dd_netfx20msi*.txt is 8002801c

Examples of this problem are the comments located here and here, and the Product Feedback Center bugs located here and here and here.

The underlying problem is that the Administrators group somehow was only granted read permission to some of the registry keys under HKEY_CLASSES_ROOT on these machines. When the .NET Framework setup tries to register type libraries, it needs to create some new values under HKCR and it fails because of a lack of permissions (8002801c means "error accessing the OLE registry"). I have been able to confirm that this is the problem by having one of the customers use RegMon, but I haven't been able to figure out how the permissions got modified to be this way. Up until now I also haven't been able to figure out how to fully reset the permissions so that .NET Framework setup will work.

Fortunately one of the customers who had this problem contacted us with a solution that worked for them, and I wanted to list it here in case others run into this same problem in the future. Here are the steps to follow to repair permissions to workaround this issue:

  1. Download the SubInACL tool from this Microsoft site and install it. By default it will install to c:\Program Files\Windows Resource Kits\Tools
  2. Go to the Start menu, choose Run and type cmd
  3. Type cd /d %ProgramFiles%\Windows Resource Kits\Tools to change directories to the folder that SubInACL is installed to
  4. Type notepad reset.cmd and press yes to create a new file named reset.cmd in c:\Program Files\Windows Resource Kits\Tools
  5. Copy and paste the following contents into reset.cmd and then save and close it (or download it from here and rename it from reset.cmd.txt to reset.cmd):
    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
    subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f
    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f
    subinacl /subdirectories %SystemDrive% /grant=administrators=f
    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f
    subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f
    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f
    subinacl /subdirectories %SystemDrive% /grant=system=f
  6. Type reset.cmd and press enter to run the SubInACL tool (you will need to have adminstrator privileges for this to run correctly). This tool will take several minutes to run
  7. After reset.cmd completes, try to install the .NET Framework 2.0 or VS 2005 again

Hopefully this will help. If you try this and still have trouble getting setup to work correctly for the .NET Framework 2.0 or VS 2005, please contact me.

Comments

  • Anonymous
    August 09, 2005
    Looking at our watson data, we have several customers who encountered a generic "setup failed" message...

  • Anonymous
    August 28, 2005
    A little while ago I wrote a post explaining how to report a bug in the .NET Framework and Visual Studio...

  • Anonymous
    September 20, 2005
    Thanks a lot for this article. It was exactly the way to workaround the problem on my server.

  • Anonymous
    December 21, 2005
    This solutions also worked for the FRx application, when another ill behaved program had placed permission limitations on some registry keys or directories. The routine allowed me to successfully register the .dll files.
    Thanks!

  • Anonymous
    January 12, 2006
    Great!!! I had this problem with the .net framework 2.0 (not beta) and the fix works fine. Tnx

  • Anonymous
    April 12, 2006
    I can oly repeat the comments above: This fix works very well. Thanxx

  • Anonymous
    April 15, 2006
    Thank you for a great, and extremly well explain solution sadely it didn't work for me

  • Anonymous
    April 15, 2006
    Hi Andy - This solution is only applicable to beta 2 and earlier versions of the .NET Framework 2.0.  Later builds, including the final release, have this bug fixed.  What is the error that you are seeing when you try to install the .NET Framework 2.0?  You may want to try the manual cleanup steps listed at http://blogs.msdn.com/astebner/archive/2005/04/16/408856.aspx and then attempt to reinstall the .NET Framework 2.0 and see if that helps resolve the issue you're seeing?

  • Anonymous
    May 15, 2006
    I agree with andy, very well written explanation and went through the steps with no problem except that it didn't fix the installation problem. I'm running windows xp home edition, service pack 2, and when I try to install the dotnetfx file it goes through the istallation process but thenstops and rolls back and gives that generic "setup failed" message at the end. I don't think I have the beta 2 version since I downloaded the framework a couple of days ago.  Also I can't find any other version of .net framework in add/remove programs to try to uninstall. I took a look at your cleanup steps and I'm afraid to go through that process because of the steps involved that may mess up my only pc. Any other suggestions on what I should do?

  • Anonymous
    May 22, 2006
    Hi Bruno - Your safest option would be to contact Microsoft technical support for further assistance.  You are entitled to a free support case for setup-related .NET Framework issues, and the technical support team can provide you with direct, one-on-one assistance.

    If you would like to try to solve it on your own, can you please zip and send me the file %temp%dd_netfx20msi*.txt at Aaron.Stebner (at) microsoft (dot) com so I can try to take a look and see if I can figure out any possible solutions?

  • Anonymous
    May 28, 2006
    Imagine this astebner, I was preparing to send you the file zip file you requested but I said hey I'll give this thing one more shot. Went to install the framework and bam, installed without a hitch. So thanks for your time and I'm glad this framework finally installed.

  • Anonymous
    June 09, 2006
    I received a mail from a customer today that described a scenario where the .NET Framework 2.0 setup...

  • Anonymous
    September 04, 2006
    A while back, I wrote a blog post about a .NET Framework 2.0 beta 2 installation problem that was caused...

  • Anonymous
    November 15, 2006
    A while back, I wrote a blog post about a .NET Framework 2.0 beta 2 installation problem that was caused

  • Anonymous
    January 22, 2009
    PingBack from http://www.hilpers.fr/751130-pb-installation-ie7

  • Anonymous
    November 16, 2012
    I had same problem. It was beacause I'm using a ramdisk wich I can't set permissions. Hope it can be helpful.

  • Anonymous
    June 03, 2013
    Old post but this worked after searching for hours.  Thanks.