The installed updates for each version of the .NET Framework installed on a computer are listed in the Windows registry. You can use the Registry Editor (regedit.exe) to view this information.
In the Registry Editor, the .NET Framework versions and installed updates for each version are stored in different subkeys. For information about detecting the installed version numbers, see How to: Determine Which .NET Framework Versions Are Installed. For information about installing the .NET Framework, see Install the .NET Framework for developers.
To find installed updates
Open the program regedit.exe. In Windows 8 and higher open the Start screen and type the name. In earlier versions of Windows, on the Start menu, choose Run and then, in the Open box, enter regedit.exe.
You must have administrative credentials to run regedit.exe.
In the Registry Editor, open the following subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Updates
The installed updates are listed under subkeys that identify the .NET Framework version they apply to. Each update is identified by a Knowledge Base (KB) number.
Example
The following code programmatically determines the .NET Framework updates that are installed on a computer. You must have administrative credentials to run this example.
using System;
using Microsoft.Win32;
public class GetUpdateHistory
{
public static void Main()
{
using (RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(@"SOFTWARE\Microsoft\Updates"))
{
foreach (string baseKeyName in baseKey.GetSubKeyNames())
{
if (baseKeyName.Contains(".NET Framework") || baseKeyName.StartsWith("KB") || baseKeyName.Contains(".NETFramework"))
{
using (RegistryKey updateKey = baseKey.OpenSubKey(baseKeyName))
{
string name = (string)updateKey.GetValue("PackageName", "");
Console.WriteLine(baseKeyName + " " + name);
foreach (string kbKeyName in updateKey.GetSubKeyNames())
{
using (RegistryKey kbKey = updateKey.OpenSubKey(kbKeyName))
{
name = (string)kbKey.GetValue("PackageName", "");
Console.WriteLine(" " + kbKeyName + " " + name);
if (kbKey.SubKeyCount > 0)
{
foreach (string sbKeyName in kbKey.GetSubKeyNames())
{
using (RegistryKey sbSubKey = kbKey.OpenSubKey(sbKeyName))
{
name = (string)sbSubKey.GetValue("PackageName", "");
if (name == "")
name = (string)sbSubKey.GetValue("Description", "");
Console.WriteLine(" " + sbKeyName + " " + name);
}
}
}
}
}
}
}
}
}
}
}
Imports Microsoft.Win32
Public Class GetUpdateHistory
Public Shared Sub Main()
Using baseKey As RegistryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey("SOFTWARE\Microsoft\Updates")
For Each baseKeyName As String In baseKey.GetSubKeyNames()
If baseKeyName.Contains(".NET Framework") OrElse baseKeyName.StartsWith("KB") OrElse baseKeyName.Contains(".NETFramework") Then
Using updateKey As RegistryKey = baseKey.OpenSubKey(baseKeyName)
Dim name As String = CStr(updateKey.GetValue("PackageName", ""))
Console.WriteLine(baseKeyName & " " & name)
For Each kbKeyName As String In updateKey.GetSubKeyNames()
Using kbKey As RegistryKey = updateKey.OpenSubKey(kbKeyName)
name = CStr(kbKey.GetValue("PackageName", ""))
Console.WriteLine(" " & kbKeyName & " " & name)
If kbKey.SubKeyCount > 0 Then
For Each sbKeyName As String In kbKey.GetSubKeyNames()
Using sbSubKey As RegistryKey = kbKey.OpenSubKey(sbKeyName)
name = CStr(sbSubKey.GetValue("PackageName", ""))
If name = "" Then
name = CStr(sbSubKey.GetValue("Description", ""))
End If
Console.WriteLine(" " & sbKeyName & " " & name)
End Using
Next sbKeyName
End If
End Using
Next kbKeyName
End Using
End If
Next baseKeyName
End Using
End Sub
End Class
The example produces output that's similar to the following:
Microsoft .NET Framework 3.5 SP1
KB953595 Hotfix for Microsoft .NET Framework 3.5 SP1 (KB953595)
SP1
KB2657424 Security Update for Microsoft .NET Framework 3.5 SP1 (KB2657424)
KB958484 Hotfix for Microsoft .NET Framework 3.5 SP1 (KB958484)
KB963707 Update for Microsoft .NET Framework 3.5 SP1 (KB963707)
Microsoft .NET Framework 4 Client Profile
KB2160841 Security Update for Microsoft .NET Framework 4 Client Profile (KB2160841)
KB2446708 Security Update for Microsoft .NET Framework 4 Client Profile (KB2446708)
KB2468871 Update for Microsoft .NET Framework 4 Client Profile (KB2468871)
KB2478663 Security Update for Microsoft .NET Framework 4 Client Profile (KB2478663)
KB2518870 Security Update for Microsoft .NET Framework 4 Client Profile (KB2518870)
KB2533523 Update for Microsoft .NET Framework 4 Client Profile (KB2533523)
KB2539636 Security Update for Microsoft .NET Framework 4 Client Profile (KB2539636)
KB2572078 Security Update for Microsoft .NET Framework 4 Client Profile (KB2572078)
KB2633870 Security Update for Microsoft .NET Framework 4 Client Profile (KB2633870)
KB2656351 Security Update for Microsoft .NET Framework 4 Client Profile (KB2656351)
Microsoft .NET Framework 4 Extended
KB2416472 Security Update for Microsoft .NET Framework 4 Extended (KB2416472)
KB2468871 Update for Microsoft .NET Framework 4 Extended (KB2468871)
KB2487367 Security Update for Microsoft .NET Framework 4 Extended (KB2487367)
KB2533523 Update for Microsoft .NET Framework 4 Extended (KB2533523)
KB2656351 Security Update for Microsoft .NET Framework 4 Extended (KB2656351)
See also
How to: Determine Which .NET Framework Versions Are Installed
Installing the .NET Framework
Versions and Dependencies




