Part 2.How to gain Full Access rights to 'C:\Program Files\WindowsApps' folder.
-
Right-click on the Start button image_thumb[2][4] and choose Command Prompt (Admin).
-
At command prompt window type the following command & hit Enter.
takeown /F "%ProgramFiles%\WindowsApps"
- Note: The above command will assign the ownership of the folder "C:\ProgramFiles\WindowsApps" to the current logged on user.
- Next give this command:
takeown /F "%ProgramFiles%\WindowsApps" /r /d y
- Note: The above command will assign the ownership of the "C:\ProgramFiles\WindowsApps" sub folders and files to the current logged on user.
- Next give this command:
icacls "%ProgramFiles%\WindowsApps" /grant Administrators:F
*Note: The above command will assign Full Control permissions to the folder "C:\ProgramFiles\WindowsApps" for all Administrators users.
- Next give this command:
icacls "%ProgramFiles%\WindowsApps" /grant Administrators:F /t
*Note: The above command will assign Full Control permissions to the folder "C:\ProgramFiles\WindowsApps" and its sub folders and files to all Administrators users.
- Finally assign the ownership of "WindowsApps" folder, back to the TrustedInstaller account, which is the Default owner of the folder.
icacls "%ProgramFiles%\WindowsApps" /setowner "NT Service\TrustedInstaller"
- From now on you should have full access rights to the "WindowsApps" folder!
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}