KSC Open API
Kaspersky Security Center API description
int SrvRi::ShouldForceReboot2 ( wstring  wstrHostID,
wstring  wstrTaskID 
)

Check if the administrator has started a forced reboot of the host. This method is only for Network Agents.

Parameters:
wstrHostIDHost ID
wstrTaskIDRemote installation task ID (see KLRI_SRVRI_RES_DESCR)
Returns:
0 to ask again later 1 if need to reboot without waiting for the user's decision 2 to cancel asking and skip administrator waiting