Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

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

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

  • Comments 17

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.

 

  • Looking at our watson data, we have several customers who encountered a generic "setup failed" message...
  • A little while ago I wrote a post explaining how to report a bug in the .NET Framework and Visual Studio...
  • Thanks a lot for this article. It was exactly the way to workaround the problem on my server.
  • 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!
  • Great!!! I had this problem with the .net framework 2.0 (not beta) and the fix works fine. Tnx
  • I can oly repeat the comments above: This fix works very well. Thanxx
  • Thank you for a great, and extremly well explain solution sadely it didn't work for me
  • 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?
  • 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?
  • 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?
  • 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.
  • I received a mail from a customer today that described a scenario where the .NET Framework 2.0 setup...
  • A while back, I wrote a blog post about a .NET Framework 2.0 beta 2 installation problem that was caused...
  • A while back, I wrote a blog post about a .NET Framework 2.0 beta 2 installation problem that was caused

  • PingBack from http://www.hilpers.fr/751130-pb-installation-ie7

Page 1 of 2 (17 items) 12
Leave a Comment
  • Please add 7 and 7 and type the answer here:
  • Post