Windows Apps Folder Issue

z0mbie789

Honorable
Nov 20, 2016
5
0
10,510
So to start off, I tried to do a system restore for an issue I have since resolved, but when I tried to do the restore I got error 0x8007045b. I found a command that was supposed to fix it which was this, cd "C:\Program Files"
takeown /f WindowsApps
icacls WindowsApps /grant Administrators:F
attrib WindowsApps -h
rename WindowsApps WindowsApps-renamed.

The command did not help to make the system restore work, but did screw up my windows apps (Forza Horizon 3, Microsoft Store, Xbox app etc). I gained access to the file which was renamed to Windows Apps -renamed and all of the apps were on there. This makes me think I can get them back to a working order and wanted to know if anyone knew how to do that.

Thanks for any help in advance!
 
Solution
So takeown gave you control of folder, then icacls let you take control of the Access Control Lists (ACLs) for files and folders.
next line just cleans a hidden attribute, and last renames the folder...

where did you get the fix from?

I found a fix that may have helped 1st error but that doesn't help you now after this fix.

Games likely had licence info in the folder you recreated (renaming folder means it auto created windowsApps folder on startup, less the game info)

You could try renaming new WindowsApps folder to WindowsApps-copy and then rename the old one back to WindowsApps and see if that helps games work

I am not sure as messing with permissions can play havoc with files.

The fix for system restore might be...
So takeown gave you control of folder, then icacls let you take control of the Access Control Lists (ACLs) for files and folders.
next line just cleans a hidden attribute, and last renames the folder...

where did you get the fix from?

I found a fix that may have helped 1st error but that doesn't help you now after this fix.

Games likely had licence info in the folder you recreated (renaming folder means it auto created windowsApps folder on startup, less the game info)

You could try renaming new WindowsApps folder to WindowsApps-copy and then rename the old one back to WindowsApps and see if that helps games work

I am not sure as messing with permissions can play havoc with files.

The fix for system restore might be
right click start button
choose powershell (admin)
type SFC /scannow and press enter
once its completed, copy/paste this command into same window:
Repair-WindowsImage -Online -RestoreHealth and press enter
SFC fixes system files, second command cleans image files, re run SFC if it failed to fix all files and restart PC
 
Solution