I'm trying to modify scheduled task through WMI Microsoft\Windows\MSFT_ScheduledTask object. However when I call instance Put method to update it I'm getting "Not supported" error. Nothing works. Is it possible at all? Am I doing something wrong?
Below is the code snippet I use for instance update after modification of its one property. Result returned is WBEM_E_NOT_SUPPORTED (0x8004100c).
// IWbemServices* WmiComConnection::ServiceObject()
// IWbemClassObjectPtr comPtr;
HRESULT result = comConnection->ServiceObject()->PutInstance(comPtr, WBEM_FLAG_UPDATE_ONLY, NULL, NULL);
throw WmiException("Failed to update a WMI object", result);