1

My computer: Dell vostro 3591 Wiindows 10 22h2 19045.3324

Hello so i would like to know if there is a command to bring back the default windows , program files, program files x86 permissions. I sadly already tried /reset and this have caused issues to my computer. I am now in the windows pe and i would like to know if there is a command for this like in this forum Reset default ACLs for C:\Program Files\WindowsApps

The command is this :

cacls "%programfiles%\WindowsApps" /s:"D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIIO;GXGR;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;CI;0x1200a9;;;BA)(A;OICI;0x1200a9;;;LS)(A;OICI;0x1200a9;;;NS)(A;OICI;0x1200a9;;;RC)(XA;;0x1200a9;;;BU;(Exists WIN://SYSAPPID))"
harrymc
  • 480,290
Ghali Mimi
  • 11
  • 1
  • 1
    What is wrong with downloading Win10 ISO and reinstalling, keeping files? – DrMoishe Pippik Nov 17 '23 at 19:33
  • @DrMoishePippik - It’s actually impossible to perform an in-place repair installation from outside of Windows. – Ramhound Nov 17 '23 at 19:51
  • @GhaliMimi - If this issue is preventing you from booting into Windows and logging into an account you will quickly find out there is no solution to this problem. Since the permissions on incorrect on such vital protected directories like Program Files even the built-in Administrator would have the same problems. Short of performing a clean install there is no solution to this problem in the state the system is in that you describe. The accepted answer to that linked question indicates NOT to use the reset command. If you used it, you’ll need to perform a clean Windows installation, to fix it – Ramhound Nov 17 '23 at 19:54
  • I used windows repair by tweaking to reset the permissions of windows apps , however this also reset my files/folder , srvices , regedit permissions – Ghali Mimi Nov 18 '23 at 19:36

2 Answers2

1

If System Restore is enabled and you have a recent enough save point, then use it to rollback Windows to a previous good state.

Otherwise, as far as WindowsApps is concerned, try to use the script of WindowsAppsUnfukker, described as:

Use this script to whip WindowsApps into submission and finally get rid of these goddamn issues!

However, if Windows is unable to even run this script, then there is no solution except a clean install of Windows. In this case, take backups of your data, or in extremity use a Linux Live USB to copy your files.

For the other folders, to reset permissions for a folder, its files, and subfolders, try to run the command:

icacls "full path to the folder" /reset /t /c /l

If Windows is restored enough, you could finish by doing a
Repair Install of Windows 10 with an In-place Upgrade.

harrymc
  • 480,290
  • Running that command against WindowsApps is discouraged since it actually won’t restore the permissions properly, which means, the command shouldn’t be ran against Program Files either since WindowsApps is a subdirectory of that folder – Ramhound Nov 17 '23 at 21:03
  • @Ramhound: For WindowsApps I recommend the above script. The whole point is to restore enough for Repair Install to work, to at least try to avoid a clean install. I don't know if it will succeed. – harrymc Nov 17 '23 at 21:37
  • The problem right now is that i dont really care about windows apps , i just want that my computer bootup again – Ghali Mimi Nov 18 '23 at 19:32
  • I also tried the /reset but it is not working :( or maybe i didnt use /l – Ghali Mimi Nov 18 '23 at 19:33
  • I also tried the /reset but it is not working :( or maybe i didnt use /l . What i used is icacls path of the folder /t /c /reset. Is there a difference with /t /c /l – Ghali Mimi Nov 18 '23 at 19:34
0

Not used it for a long time, but Windows Repair all-in-one used to be excellent for 'user-level' repair tasks. Never known it to break anything.
A lot of what it does leverages Windows' own routines, just without the need for expert knowledge. Other parts are proprietary to the app.

Freeware version is sufficient for most needs.

[No affiliation, just a satisfied user.]

Tetsujin
  • 49,589
  • 1
    Hmm well , i decided that i will go this saturday to a technician to see if he can found another solution than a clean install , wish me luck please – Ghali Mimi Nov 22 '23 at 21:22