Sys_CheckEventlogForSystemErrors
Description
Section titled “Description”Checks the System event log on the local computer for critical errors from the last 30 days, and writes each error it finds to the package log.
The events to look for are listed in the CritialErrors entry in the [Events] section of Capalib.ini in the Lib folder of the CapaInstaller client. By default, these are the events 4, 6, 7, 10, 13 and 31 from the source Disk. Event 7 (bad block) is ignored if it’s reported for a disk that isn’t a fixed disk. If the entry is empty, the function skips the check.
Disable the check
Section titled “Disable the check”To disable Sys_CheckEventlogForSystemErrors on one client, create this string value in the registry:
- Key:
HKLM\Software\CapaSystems\CapaInstaller - Value name:
DisableEventchk - Value data:
True
To disable Sys_CheckEventlogForSystemErrors on all clients, add this line to the CustomInit function in Customlib (customlib.cis), and deploy Customlib to the clients:
gbDisableEventChk=TrueSyntax
Section titled “Syntax”Sys_CheckEventlogForSystemErrors() As Boolean
Return value
Section titled “Return value”The function returns False if one or more of the events are found. It then also sets the return code of the job to 1358. The function returns True if no events are found, or if the check is disabled.
Example
Section titled “Example”If bStatus Then bStatus = Sys_CheckEventlogforSystemErrors()