Version: 11
restore

Contents

This is work in progress.

Method

DeployPatch

ModulePatch
LibraryCore
Action

Deploy (i.e. download and by default install) the specified patch to this device.

TBD

Should this be renamed to just "Deploy" because "Patch.DeployPatch" seems a little tautological?
Parameters

    MultiExcerpt named 'PatchSourceParameter' was not found
The page: Method Notes was found, but the multiexcerpt named 'PatchSourceParameter' was not found. Please check/update the page name used in the 'multiexcerpt-include macro.

PatchId (string; optional, default all available patches): The identifier of the patch that should be deployed. This is in the form of a KB ID, not a low level GUID. If not specified, all available patches will be deployed.

TBDs

Should a comma-separated list be supported so that mutiple patches can be deployed in one action?

What is the result if the patch is not available or not applicable to the device? Is that an error or just quietly ignored (so the method could return success-no-content)?

This should be 'KBNumber' (or something similar) rather than 'PatchId' ?

DownloadOnly (boolean; default false): The patch should be downloaded from the source but not installed.

CabFilePath (string; default empty): The full path of the location of the .cab file if Source is 'CAB'.

This must be specified if Source is 'CAB' and should not be specified for any other Source value.

If the path is specified it must be to a local CAB-file. Shared, i.e. remote, CAB-files are not supported by Windows Update Agent.

Return values

For each patch that was deployed:

PatchId (string): The patch identifier passed in to the method.

DownloadOnly (boolean): Whether the patch was to be just staged (false) or also installed (true), i.e. the supplied or implicit DownloadOnly parameter.

NeededDownload (boolean): Whether the patch actually needed to be downloaded.

DownloadResult (integer): The COM success (0) or error (not 0) codes related to downloading.

DownloadError (string): The human readable form of the DownloadedResult column if a download error occurred.

NeededInstallation (boolean): Whether the patch actually needed to be installed (true) or it was already installed (false).

InstallResult (integer): The COM success (0) or error (not 0) codes related to installation.

InstallError (string): The human readable form of InstallResult if an installation error occurred.

Example
Patch.DeployPatch(Source:"SCCM", PatchId:"KB3045305");
Platforms
  • Windows
Notes