KSC Open API
Kaspersky Security Center API description
PackagesApi::SetLicenseKey ( int  nPackageId,
wstring  wstrKeyFileName,
binary  pData,
boolean  bRemoveExisting 
)

Set license key.

Parameters:
nPackageId(int) Package ID.
wstrKeyFileName(wstring) Key file name.
pData(binary) Key data. NULL means 'delete existing', in this case bRemoveExisting must be true
bRemoveExisting(boolean) Remove all existing license keys.
Exceptions:
Throwsexception in case of error.