🟣 C# / .NET 6+
Get Installed Hotfixes Report (C#)
Queries Win32_QuickFixEngineering via WMI (System.Management) and prints Installed Hotfixes to the console.
GetQuickFixEngineeringReport.cs
// GetQuickFixEngineeringReport.cs
//
// Reports Installed Hotfixes via WMI (Win32_QuickFixEngineering).
//
// Requires the System.Management package:
// dotnet new console -o QuickFixEngineeringReport
// dotnet add package System.Management
// (replace the generated Program.cs with this file, then dotnet run)
// On .NET Framework, System.Management is already available — just
// add a reference to it in your project.
using System;
using System.Management;
var searcher = new ManagementObjectSearcher("SELECT HotFixID, Description, InstalledOn, InstalledBy FROM Win32_QuickFixEngineering");
int count = 0;
foreach (ManagementObject item in searcher.Get())
{
Console.WriteLine($"HotFixID: {item["HotFixID"]}");
Console.WriteLine($"Description: {item["Description"]}");
Console.WriteLine($"InstalledOn: {item["InstalledOn"]}");
Console.WriteLine($"InstalledBy: {item["InstalledBy"]}");
Console.WriteLine(new string('-', 40));
count++;
}
if (count == 0)
{
Console.WriteLine("No Installed Hotfixes found.");
}
else
{
Console.WriteLine($"\n{count} Installed Hotfixes found.");
}