0x80070005 revisited

A while ago I blogged about a recurring problem in my laptop: event log was filling with Software protection service scheduling errors, and the fix was to change one system folder’s permissions. I ended up re-installing my laptop from scratch (to Windows 8.1), and again after I joined the machine to our company domain and installed Symantec Endpoint Protection the problem re-appeared. I still do not know which - domain or SEP or both together - is the root cause, but as the problem emerged over and over again, I gave up and automatized the change. I created one batch file:

ECHO Fixing Software protection service scheduling ACL problem.
icacls %systemroot%\System32\Tasks\Microsoft\Windows\SoftwareProtectionPlatform /grant "NETWORK SERVICE":(OI)(CI)F

…and scheduled this file with admin permissions to run semi-frequently (one could also add an event log trigger to this one event). Problem solved (for now).