How to get file management ownership in Windows

  
Starting from VISTA, Microsoft's security of the operating system has been significantly improved, so that the files (folders) that we can open or delete under XP can not be operated under WIN7. Even if it is under the Administrator super administrator account, it is impossible to operate. Prompt "You need permission from TrustedInstaller to make changes to this folder", or the prompt location is unavailable, and access is denied.
In particular, cleaning up the system garbage, no matter what tools are used, can not clean the files in the protected folder, for the convenience of operation, here is a registry file, after importing the registry, you only need to operate the file (Clip) Right click —— the administrator takes ownership so you can open or delete it.
It should be noted that if you are not very proficient in the system structure, please do not delete the files that are useful to the system!!!
The contents of the registry are as follows:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT *shellrunas]
@="Administrator Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT*shellrunascommand]
@="cmd.exe /c takeown /f "%1" & icacls "%1" & icacls "%1" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f "%1" ; & icacls "%1" /grant administrators:F"
[HKEY_CLASSES_ROOTexefileshellrunas2]
@="Administrator Ownership"
"NoWorkingDirectory"=""
[ ,null,null,3],HKEY_CLASSES_ROOTexefileshellrunas2command]
@="cmd.exe /c takeown /f "%1" & icacls "%1" & icacls "%1" /grant administrators:F"
"IsolatedCommand" ;="cmd.exe /c takeown /f "%1&quo & icacls "%1" /grant administrators:F"
[HKEY_CLASSES_ROOTDirectoryshellrunas]
@="Administrator Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTDirectoryshellrunascommand]
@="cmd.exe /c takeown /f "%1" /r /dy & icacls "%1" & icacls "%1" /grant administrators:F /t" ;
"IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /dy & icacls "%1" /grant administrators:F /t"
Previous content It can also be used in Windows 7, but it can't be used under Win7SP1 system platform. Here is a registry for Win7SP1 platform:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT*shellrunas]
@=" ; administrator takes ownership "
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT*shellrunascommand]
@="cmd.exe /c takeown /f "%1" && ; icacls "%1" /grant administrators:F"< Br>"IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
[HKEY_CLASSES_ROOTexefileshellrunas2]
@=" ; administrator takes ownership "
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTexefileshellrunas2command]
@="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
[HKEY_CLASSES_ROOTDirectoryshellrunas]
@="Administrator Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTDirectoryshellrunascommand]
@="cmd.exe /c takeown /f "%1" /r /dy && icacls "%1" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f "% 1" /r /dy && icacls "%1" /grant administ Rators:F /t"

Copyright © Windows knowledge All Rights Reserved