Contents
Method | DeployPatch |
---|---|
Module | Patch |
Library | Core |
Action | Deploy (i.e. download and by default install) either all available patches or specific patches to this device. |
Parameters |
Case is not significant. |
For Windows, this is a comma-separated list of Knowledge Base article numbers. (See example below.) | |
This does not apply to the SCCM source; the effect is that it is ignored. | |
This must be specified if 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. | |
| |
Synchronous ( | |
This parameter is incompatible with If the timeout occurs the install will continue in the background as though nothing happened but It will be necessary to call ListUpdates to determine the new state of the device. | |
Return values | For each of the supplied patches or if not supplied for all available patches the following is returned: |
PatchSpec (string): The patch identifier. For Windows, a Knowledge Base article number. | |
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, otherwise empty if no download is attempted. | |
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, otherwise empty if installation is not attempted. | |
InstallError (string): The human readable form of InstallResult if an installation error occurred. | |
| |
Example | Patch.DeployPatch(Source:"SCCM", PatchSpec:"2267602,3182545", DownloadOnly:true); |
Platforms |
|
Notes | Updates will be performed only if they do not require user input. However, any license agreements are accepted automatically. Windows may refuse to allow installations if a reboot is pending. If no update information is available then the method will return success with no rows. The method does not fail with an error if the |