Share via


Windows.Management.Update Namespace

The types in this namespace allow users to opt in or out of receiving Windows Insider Preview builds on their device. The APIs are intended to be used by IoT original equipment manufacturers (OEMs).

Classes

PreviewBuildsManager

Manages the state of preview builds for the device.

PreviewBuildsState

Contains information used to connect a device to associate the device with the Windows Insider Program.

WindowsUpdate

WindowsUpdate is essentially a property bag with information about a pending or in-progress update.

WindowsUpdateActionCompletedEventArgs

Event data for the corresponding WindowsUpdateManager.ActionCompleted event.

WindowsUpdateActionProgress

Returned by the ActionProgress properties of WindowsUpdate and WindowsUpdateProgressChangedEventArgs.

WindowsUpdateActionResult

Returned by the WindowsUpdate.ActionResult property.

WindowsUpdateAdministrator

Enables administration of Windows Updates on a device.

WindowsUpdateApprovalData

Allows additional metadata to be configured on an update when approving it via ApproveWindowsUpdate.

WindowsUpdateAttentionRequiredInfo

Represents a tuple of a WindowsUpdateAttentionRequiredReason and a timestamp.

WindowsUpdateAttentionRequiredReasonChangedEventArgs

Event data for the corresponding WindowsUpdateManager.AttentionRequiredReasonChanged event.

WindowsUpdateGetAdministratorResult

Represents the result of calling GetRegisteredAdministrator.

WindowsUpdateItem

Represents a property bag of information regarding an update that was previously completed.

WindowsUpdateManager

Interface used for monitoring update activity via callbacks, and retrieving update history.

WindowsUpdateProgressChangedEventArgs

Event data for the corresponding WindowsUpdateManager.ProgressChanged event.

WindowsUpdateRestartRequestOptions

Represents a property bag of fields that can be configured, and then passed to RequestRestart.

WindowsUpdateScanCompletedEventArgs

Event data for the corresponding WindowsUpdateManager.ScanCompleted event.

Enums

WindowsUpdateAdministratorOptions

Defines constants that specify the administrator options that the caller wants control over when registering with RegisterForAdministration.

WindowsUpdateAdministratorStatus

Defines constants that specify status codes to indicate whether the registration/unregistration of a Windows update administrator succeeded.

WindowsUpdateAttentionRequiredReason

Defines constants that specify a detailed reason as to why attention is required for an update before it can proceed.

Examples

This C# example demonstrates how a user can determine whether their device is receiving preview builds, or whether there are problems preventing the device from getting preview builds.

public string GetErrorMessage() 
{ 
    PreviewBuildsManager manager = PreviewBuildsManager.GetDefault(); 
    if (manager != null) 
    { 
        PreviewBuildsState state = manager.GetCurrentState(); 
        if (state.Properties.ContainsKey("ErrorMessage")) 
        { 
            return state.Properties["ErrorMessage"].ToString(); 
        } 
    } 
    return String.Empty; 
} 

Remarks

These APIs allow an IoT device to receive Windows Insider Preview builds. It's expected that the OEM of the device will create a settings page within the Windows Device Portal for device configuration properties. At a high level, information from PreviewBuildsState will be read by the device, then displayed to the user, and then used to register the user's account to the device. After registration, all settings management will be done online through the Windows Insider Program instead of on the device itself.