Tuesday, 10 December 2019

windows 8 - Can I revert changes from the TAKEOWN and ICACLS commands?

From the question linked below, Moab posted a response on how to copy/edit files under Program Files if access is being denied.



How can I disable access denied when copying from network drive to program files?


To do so:



  1. Go to > Start > All Programs > Accessories

  2. Right-click on Command Prompt, and then click Run as Administrator.


  3. Type the following command and press Enter:


        takeown /f [path to folder] /r /d y   


  4. To assign the Administrators group Full Control Permissions for the folder, use this command and hit Enter:


        icacls [path to folder] /grant administrators:F /T



For some dumb reason, I did this to the whole Program Files directory (recursively) instead of the one program folder I was working with.


Is there any way to revert the changes of TAKEOWN? Do I just need to enter it again with the "/A" parameter to give ownership to Administrators (assuming that's where it came from)?

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...