I faced the exact problem here. and I solved it by:

1- Boot to Windows Recovery Environment (RE), reach to command prompt.
2- Get Windows 8.1 drive letter by running:
Code:
diskpart
lis vol
exit
3- Suppose the drive letter was E:
Code:
icacls E:\* /T /C /Q /RESET
4- Reboot to Windows 8.1 again and also form an elevated command prompt:
Code:
icacls "C:\Program Files" /grant "ALL APPLICATION PACKAGES":(OI)(CI)(RX) /C /Q
icacls C:\Windows /grant "ALL APPLICATION PACKAGES":(OI)(CI)(RX) /C /Q
icacls C:\users /grant "ALL APPLICATION PACKAGES":(OI)(CI)(F) /C /Q
Step 4 is automated based on this article.