rodrigosantosbr

gain Full Access rights 'C:Program FilesWindowsApps

Aug 21st, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

Part 2.How to gain Full Access rights to 'C:\Program Files\WindowsApps' folder.

  1. Right-click on the Start button image_thumb[2][4] and choose Command Prompt (Admin).

  2. 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.
  1. 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.
  1. 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.

  1. 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.

  1. 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"

  1. From now on you should have full access rights to the "WindowsApps" folder!

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Add Comment
Please, Sign In to add comment