Can I revert changes from the TAKEOWN and ICACLS commands?

3

1

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)?

user236264

Posted 2013-07-07T08:22:54.147

Reputation: 31

1you rather try sfc /Scannow it would restore the Windows part of \ program files. The other programmes should belong to admin or user's groups. you could change it back with icacls or takeown – Yurij73 – 2013-08-22T06:53:45.840

No answers