InstallPackage
Installs a previously downloaded package on the endpoint. This API requires Administrator privilege and supports patchv2.dat and wuo data files.
Syntax
Method ID
#define WA_VMOD_PATCH_INSTALL_PACKAGE 50305
JSON Input Structure
{
"input": {
"method": 50305,
"package_uuid": string,
"path": string,
"force_close_processes": boolean,
"force_preprocess_installer": boolean,
"expected_installer_sha256": string
}
}
Input Properties
| Parameter | Type | Description |
|---|---|---|
package_uuid | string | The Universally Unique Identifier of the package to install. |
path | string | The path of the package file. |
force_close_processes | boolean | (optional) When true, the SDK forcibly terminates any running process that blocks installation. Default value is false. |
force_preprocess_installer | boolean | (optional) (Windows only) (Windows only) (Third-party patching flow) Forces the SDK to preprocess and install the product even if the provided installer does not comply with security policies. Use this option only if you trust the installer and accept that the SDK may modify it during installation. When false (default), the SDK will validate the installer and fail with an error if any security issues are detected. |
expected_installer_sha256 | string | (optional) The expected SHA-256 hash of the provided installer. If specified, the SDK calculates the SHA-256 hash of the installer and compares it with this value. If they do not match, the SDK halts the installation process. |
JSON Output Structure
{
"result": {
"method": 50305,
"code": number,
"timing": number,
"timestamp": string,
"patch_uuid": string,
"installer_exit_code": number,
"terminated_processes": [
string,
...
],
"version": string,
"language": string,
"architecture": string,
"log_paths": [
string,
...
]
}
}
Output Properties
| Property | Type | Description |
|---|---|---|
result.method | number | The method ID that generated this result. |
result.code | number | The result code. See Result Codes. |
result.timing | number | The measured time for the method call in milliseconds. |
result.timestamp | string | The timestamp in seconds of when the call was made. |
result.patch_uuid | string | The Universally Unique Identifier of the parent patch used to install the package. |
result.installer_exit_code | number | (optional) The exit code returned by the installer. If the SDK was unable to capture it, this field will be omitted. |
result.terminated_processes | array<string> | (optional) List of processes that were forcibly terminated during installation. |
result.version | string | The detected version of the installed product. If the package is a Windows patch, OS version is returned. |
result.language | string | (optional) Language code of the installed product. Empty string if not detected. |
result.architecture | string | Architecture of the installed product. |
result.log_paths | array<string> | (optional) Paths to the log files related to the installation process, if available. |
Result Codes
| Code | Name | Description |
|---|---|---|
| 0 | WAAPI_OK | The operation completed successfully. |
note
Other codes may be returned. See the full Result Codes reference for the complete list.
Remarks
Error Handling
The results of this function are determined by the error code returned by the call. If successful, WAAPI_OK or a special success code will be returned. Always check both the function return value and the result.code field in the output JSON.
Examples
Examples will be added here demonstrating the usage of this method.
See Also
Last updated: 2026-10-01