Advertisement
TrashRat

Take Ownership/Full Access of Folder

Feb 9th, 2019
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.32 KB | None | 0 0
  1. :: REED, 2/9/2019. Useful for taking control of windows components you need to manually rip out.
  2. @echo !!!RUN THIS BATCH AS ADMINISTRATOR!!!
  3. @echo off
  4. set /p FileVar=Enter full path of folder you want to take over:
  5. takeown /a /r /d Y /f %FileVar%
  6. icacls %FileVar% /grant %username%:F /t
  7. CACLS %FileVar% /r /p %username% F
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement