A .NET library for querying and retrieving metadata from the Microsoft Windows Update service. This library provides a simple, modern API for accessing Windows Update categories, classifications, products, and update information programmatically.
MUCatalogSharp is built on top of Microsoft's update infrastructure and provides strongly-typed models for working with Windows Update data. The library handles the complexity of communicating with Microsoft's update services and exposes an easy-to-use API for retrieving update categories, metadata, files, and product hierarchies.
The library is designed for applications that need to query Windows Update information, such as update management tools, compliance systems, or automated patch deployment solutions.
- Asynchronous streaming API for efficient memory usage
- Strongly-typed models for updates, drivers, and categories
- Support for filtering by product and classification
- Progress reporting for long-running operations
- Built-in handling of bundled updates
- Support for .NET 10
Add a reference to the MUCatalogSharp project in your solution, or build and reference the compiled assembly.
Categories include classifications (e.g., Security Updates, Critical Updates) and products (e.g., Windows 10, Windows 11).
using MUCatalogSharp;
using MUCatalogSharp.Progress;
var progress = new Progress<DetailedProgress>(p =>
{
Console.WriteLine($"{p.Operation}: {p.Count}/{p.Total}");
});
await foreach (var category in UpdateRetriever.GetCategoriesAsync(progress))
{
Console.WriteLine($"{category.Name} ({category.Id})");
}You can filter categories to retrieve only specific types:
using MUCatalogSharp.Filters;
// Get only classifications
await foreach (var classification in UpdateRetriever.GetCategoriesAsync(
progress,
CategoryTypeFilter.Classification))
{
Console.WriteLine($"Classification: {classification.Name}");
}
// Get only products
await foreach (var product in UpdateRetriever.GetCategoriesAsync(
progress,
CategoryTypeFilter.Product))
{
Console.WriteLine($"Product: {product.Name}");
}To retrieve updates, you must specify at least one product GUID and one classification GUID. The library provides well-known constants for common products and classifications:
using MUCatalogSharp.Classifications;
var updates = await UpdateRetriever.GetUpdatesAsync(
progress,
productFilter: [WellKnownProduct.Windows10],
classificationFilter: [WellKnownClassification.SecurityUpdates]);
foreach (var update in updates)
{
if (update is MUCatalogSharp.Models.Update softwareUpdate)
{
Console.WriteLine($"Update: {softwareUpdate.Title}");
Console.WriteLine($" KB Article: {softwareUpdate.KBArticleId}");
Console.WriteLine($" Severity: {softwareUpdate.Severity}");
Console.WriteLine($" Support URL: {softwareUpdate.SupportUrl}");
}
else if (update is MUCatalogSharp.Models.Driver driver)
{
Console.WriteLine($"Driver: {driver.Title}");
Console.WriteLine($" Provider: {driver.DriverProvider}");
Console.WriteLine($" Version: {driver.DriverVerDate}");
}
}Available well-known products include:
WellKnownProduct.Windows10WellKnownProduct.Windows11WellKnownProduct.WindowsServer2019WellKnownProduct.WindowsServer2022WellKnownProduct.WindowsServer2025WellKnownProduct.Windows10Drivers(for driver updates)WellKnownProduct.Windows11Drivers(for driver updates)
Available well-known classifications include:
WellKnownClassification.SecurityUpdatesWellKnownClassification.CriticalUpdatesWellKnownClassification.UpdatesWellKnownClassification.UpdateRollupsWellKnownClassification.ServicePacksWellKnownClassification.FeaturePacksWellKnownClassification.DriversWellKnownClassification.ToolsWellKnownClassification.UpgradesWellKnownClassification.DefinitionUpdates
Important: Drivers have separate product identifiers. To retrieve driver updates, you must use the driver-specific product (e.g., WellKnownProduct.Windows11Drivers) along with the WellKnownClassification.Drivers classification:
using MUCatalogSharp.Classifications;
// Correct way to retrieve driver updates for Windows 11
var driverUpdates = await UpdateRetriever.GetUpdatesAsync(
progress,
productFilter: [WellKnownProduct.Windows11Drivers],
classificationFilter: [WellKnownClassification.Drivers]);
foreach (var update in driverUpdates)
{
if (update is MUCatalogSharp.Models.Driver driver)
{
Console.WriteLine($"Driver: {driver.Title}");
Console.WriteLine($" Provider: {driver.DriverProvider}");
Console.WriteLine($" Version: {driver.DriverVerDate}");
Console.WriteLine($" Class: {driver.DriverClass}");
}
}Note: Retrieving driver updates can be extremely time-consuming. During testing, retrieving all drivers for Windows 11 took over 90 minutes due to the large number of available drivers.
Each update contains information about its associated files:
using MUCatalogSharp.Classifications;
var updates = await UpdateRetriever.GetUpdatesAsync(
progress,
productFilter: [WellKnownProduct.Windows11],
classificationFilter: [WellKnownClassification.CriticalUpdates]);
foreach (var update in updates)
{
if (update is MUCatalogSharp.Models.Update softwareUpdate)
{
Console.WriteLine($"\nUpdate: {softwareUpdate.Title}");
Console.WriteLine("Files:");
foreach (var file in softwareUpdate.Files)
{
Console.WriteLine($" - {file.FileName}");
Console.WriteLine($" URL: {file.DownloadUrl}");
Console.WriteLine($" Size: {file.Size:N0} bytes");
Console.WriteLine($" SHA256: {file.Digest.DigestBase64}");
}
}
}
}All asynchronous operations support cancellation tokens:
using var cts = new CancellationTokenSource();
cts.CancelAfter(TimeSpan.FromSeconds(30));
try
{
await foreach (var category in UpdateRetriever.GetCategoriesAsync(
progress,
cancellationToken: cts.Token))
{
Console.WriteLine(category.Name);
}
}
catch (OperationCanceledException)
{
Console.WriteLine("Operation was cancelled");
}The solution includes a complete example application (MUCatalogSharp.Example) that demonstrates how to use the library with a command-line interface. The example uses Spectre.Console for rich terminal output.
To run the example:
# List all categories
dotnet run --project MUCatalogSharp.Example category
# Get updates for a specific product and classification
dotnet run --project MUCatalogSharp.Example update <PRODUCT_GUID> <CLASSIFICATION_GUID>The library provides the following main model types:
Category: Base class for all category typesClassification: Security Updates, Critical Updates, etc.Product: Windows products and versionsDetectoid: Detection rules for update applicabilityIUpdate: Interface for all update typesUpdate: Software updatesDriver: Driver updatesFile: Update file information with download URLs and checksums
- .NET 10 or later
- Network access to Microsoft Update services
The original implementation of the Windows Update protocol handling was adapted from Microsoft's update-server-server-sync repository. The code has been heavily modified and rewritten to add asynchronous functionality, reduce complexity, and provide a more developer-friendly API surface.