Hızlı yanıt: kod örneği
The folder is one of the most heavily protected folders in Windows 10. It contains all the Windows UWP apps, to which Microsoft zealously guards the access.
The protections on this folder may change across Windows versions.The usual methods of taking ownership and assigning permissions are not enough for this folder, but are still required as first step to gaining access.
After executing them, accessing the folder is now possible for copying, but editing is still blocked. To edit, one needs to save the file elsewhere, and only then replace the original with the edited version.A further note is that restoring the ownership of the folder to
is possible without losing the extra permissions that were assigned,
by using the command:If someone wishes to use an elevated Command Prompt for gaining
access to the folder, then these are the commands :I also note that permission problems can be avoided by using the following
commands before and after changing permissions to completely
restore the original permissions :To complement the poster's remark about restoring
the original permissions on the folder while not having saved
these permissions before starting, this is done by entering in an elevated
Command Prompt (cmd) the command :If the command does not work, it needs to be redone from a Windows boot CD/USB,
as explained in the post
Reset default ACLs for C:\Program Files\WindowsApps:
WindowsApps
TrustedInstaller
icacls "%ProgramFiles%\WindowsApps" /setowner "NT Service\TrustedInstaller" /t
takeown /F "%ProgramFiles%\WindowsApps" takeown /F "%ProgramFiles%\WindowsApps" /r /d y icacls "%ProgramFiles%\WindowsApps" /grant Administrators:F icacls "%ProgramFiles%\WindowsApps" /grant Administrators:F /t
icacls "%ProgramFiles%\WindowsApps" /save WindowsApps.aclicacls "%ProgramFiles%" /restore WindowsApps.acl
icacls "%ProgramFiles%\WindowsApps" /q /c /t /reset
- Follow the instructions on this page to create the Windows Installation Media
- Boot from the USB/CD, click "Repair my computer" upon reaching the Install button
- Select Troubleshoot, then Command Prompt
- Your current drive will be the boot media, with your Windows system disk likely in
C:
, so verify usingD:
, and if not, then search for the right drive-letterdir D:
- Using the drive letter you just found (maybe ), issue the command:
D:\
icacls "D:\Program Files\WindowsApps" /q /c /t /reset
- Wait for the operation to complete, and check the output for errors
- Reboot.