Yesterday after installing SharePoint 2013 Sp1 on Windows server 2012 R2 while SharePoint 2013 Products Configuration wizard running I ve got “Exception: System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.” error on step 4. After a lil search and “Procmon” from Sys internals I realize that Even though your setup account is an local administrator or Domain administrator, U cannot Access to c:\windows\tasks folder to create tasks. After cheking security tab I see only system Account is the owner and has full control,
Resolution :
Change owner to Administrators group
Set Local Administrators group has full control over folder.
And It Works.