Delete TrustedInstaller-only Files and Folders
Not very security related, but something I don’t want to forget how to do. It was a PITA. So I had a old WINDOWS directory that I needed to get rid of. And the following commands gave me the ooomph needed to get the job done.
- Get a SYSTEM shell so all modding of permissions will be good.
psexec /accepteula -i -s cmd
- Grant Administrators FULL rights to the directory and all sub directories and files
icacls C:\Windows\* /grant Administrators:F /C /T
- Finish the job, delete the folder and everything below it
rmdir /s /q C:\Windows\
All done. Weeeeeeeee!
If you have a better way to do this via commands or programs please let me know, always looking to learn more.