KSC Open API
Kaspersky Security Center API description
wstring PackagesApi::GetExecutablePkgFileAsync ( params  pParams,
int  nPackageId 
)

Get standalone package file attributes (asynchronously).

Parameters:
pParams(paramParams) Options container (reserved for future use).
nPackageId(int) Executable package ID.
Returns:
(wstring) Request ID used to subscribe to the event that is triggered when operation is complete.
Remarks:
Check the operation state by calling AsyncActionStateChecker::CheckActionState periodically until it's finalized or cancel it by calling PackagesApi::CancelGetExecutablePkgFile. If the operation succeeds then AsyncActionStateChecker::CheckActionState returns these attributes in pStateData container:
  • KLPKG_EP_EXECID - (int) ID of the standalone package.
  • KLPKG_EP_FILENAME - (wstring) short name of excutable binary
  • KLPKG_EP_FILESIZE - (int) Size (in bytes) of the standalone package file.
  • KLPKG_EP_SHA256 - (wstring) Package Sha256 (in hex format)
  • KLPKG_EP_DOWNLOAD_PATH - (wstring) Download path of the standalone package file. The virtual package file should be downloaded right after the action is finalized, and in the same network session.
    The persistent packages utilize a fixed download link, which allows the download to be postponed to any time.
    To download it, client should send an HTTP GET-request containing the value of the KLPKG_EP_DOWNLOAD_PATH, see Files download
    Note: KLPKG_EP_DOWNLOAD_PATH already contains the RESOURCE_PREFIX and the package download identifier.
    Example: KLPKG_EP_DOWNLOAD_PATH is FTFD/1b20a383-9ae7-49e3-b0ad-1e5edfe5926d
    If the action failed then call to AsyncActionStateChecker::CheckActionState returns error in pStateData.
Exceptions:
Throwsexception in case of error.