.NET Framework Error: Please set registry key InstallRoot

When you install a program that uses .NET Framework, the following error message may appear:

.NET Framework initialization Error

Please set registry key 
HKLM\SOFTWARE\Microsoft\.NETFramework\InstallRoot  to
point to the .NET Framework installation

.NET Framework InstallRoot error

Running the .NET Framework Repair tool or removing and reinstalling .NET Framework may not resolve the error.

Cause

The above error occurs due to the missing InstallRoot registry value in one or both of the following keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework

Resolution

To fix the .NET Framework initialization Error, please create the missing values in the registry.

Option 1: Use the REG file to restore the missing values

To restore the InstallRoot registry values, download and run netfx_installroot_fix.reg (zipped)



Unzip and run the enclosed REG file.

Click Yes to confirm.


Option 2: Create the values manually

  1. Launch Regedit.exe and go to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
  2. In the right pane, create a new string value (REG_SZ) named InstallRoot (if it doesn’t already exist.)
  3. Set the value data of InstallRoot to C:\Windows\Microsoft.NET\Framework64\
  4. Next, go to the following branch:
    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework
  5. In the right pane, create a new string value (REG_SZ) named InstallRoot (if it doesn’t already exist.)
  6. Set the value data of InstallRoot to C:\Windows\Microsoft.NET\Framework\
  7. Exit the Registry Editor.

Note: The 2nd location above (i.e., the WOW6432Node branch) doesn’t exist if you’re using Windows 10/11 32-bit edition. In that case, skip the 2nd location. To determine if you’re using 32-bit or 64-bit edition, see this article How to Find Your Windows 10/11 Build Number, Version, Edition and Bitness.

That should resolve the .NET Framework “InstallRoot” error.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Reply