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 (null ) 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 Patch Success uses 4 intructions, 1 from SLA inventory and 3 from the 1E-PatchSuccess product packs. Patch Success uses this method it its 1E-PatchSuccess-Deploy instruction to cause a specific KB to be deployed. WHEN NeededInstallation = 0 AND InstallResult IS NULL AND DownloadResult IS NULL THEN "Already installed or not applicable" WHEN InstallResult = 0 AND RebootRequired = 0 THEN "Installed successfully" WHEN InstallResult = 0 AND RebootRequired = 1 THEN "Installed successfully - pending reboot" WHEN InstallResult IS NOT NULL AND InstallResult <> 0 AND InstallError != "" AND InstallError IS NOT NULL THEN "Failed - " || InstallError WHEN InstallResult IS NOT NULL AND InstallResult <> 0 THEN "Failed - unspecified error occured" WHEN DownloadResult IS NOT NULL AND DownloadResult <> 0 AND DownloadError != "" AND DownloadError IS NOT NULL THEN "Download failed - " || DownloadError WHEN DownloadResult IS NOT NULL AND DownloadResult <> 0 THEN "Download failed - unspecified error occured" WHEN InstallError IS NOT NULL AND InstallError != "" THEN "Failed - " || InstallError WHEN DownloadError IS NOT NULL AND DownloadError != "" THEN "Download failed - " || DownloadError ELSE "Failed - unhandled error" |